You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/models
sebastian-sauer 55532061c8
Add commits dropdown in PR files view and allow commit by commit review (#25528)
This PR adds a new dropdown to select a commit or a commit range
(shift-click like github) of a Pull Request.
After selection of a commit only the changes of this commit will be shown.
When selecting a range of commits the diff of this range is shown.

This allows to review a PR commit by commit or by viewing only commit ranges.
The "Show changes since your last review" mechanism github uses is implemented, too.
When reviewing a single commit or a commit range the "Viewed" functionality is disabled.

## Screenshots

### The commit dropdown

![image](https://github.com/go-gitea/gitea/assets/51889757/0db3ae62-1272-436c-be64-4730c5d611e3)

### Selecting a commit range

![image](https://github.com/go-gitea/gitea/assets/51889757/ad81eedb-8437-42b0-8073-2d940c25fe8f)

### Show changes of a single commit only

![image](https://github.com/go-gitea/gitea/assets/51889757/6b1a113b-73ef-4ecc-adf6-bc2340bb8f97)

### Show changes of a commit range

![image](https://github.com/go-gitea/gitea/assets/51889757/6401b358-cd66-4c09-8baa-6cf6177f23a7)


Fixes https://github.com/go-gitea/gitea/issues/20989
Fixes https://github.com/go-gitea/gitea/issues/19263

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
2 years ago
..
actions Fix wrong workflow status when rerun a job in an already finished workflow (#26119) 2 years ago
activities Add context parameter to some database functions (#26055) 2 years ago
admin Replace `interface{}` with `any` (#25686) 2 years ago
asymkey Update tool dependencies, lock govulncheck and actionlint (#25655) 2 years ago
auth Remove "misc" scope check from public API endpoints (#26134) 2 years ago
avatars Avoid warning for system setting when start up (#23054) 2 years ago
db Replace `interface{}` with `any` (#25686) 2 years ago
dbfs Fix content holes in Actions task logs file (#25560) 2 years ago
fixtures Add commits dropdown in PR files view and allow commit by commit review (#25528) 2 years ago
git Fix bugs in LFS meta garbage collection (#26122) 2 years ago
issues Add commits dropdown in PR files view and allow commit by commit review (#25528) 2 years ago
migrations Prevent primary key update on migration (#26192) 2 years ago
organization Remove unused code (#25734) 2 years ago
packages Test if container blob is accessible before mounting (#22759) 2 years ago
perm some less naked returns (#25682) 2 years ago
project Update xorm version (#26128) 2 years ago
pull refactor some functions to support ctx as first parameter (#21878) 2 years ago
repo Add commits dropdown in PR files view and allow commit by commit review (#25528) 2 years ago
secret Support configuration variables on Gitea Actions (#24724) 2 years ago
shared/types Display owner of a runner as a tooltip instead of static text (#24377) 2 years ago
system Replace `interface{}` with `any` (#25686) 2 years ago
unit Rewrite logger system (#24726) 2 years ago
unittest Replace `interface{}` with `any` (#25686) 2 years ago
user Fix inconsistent user profile layout across tabs (#25625) 2 years ago
webhook Replace `interface{}` with `any` (#25686) 2 years ago
error.go Sync branches into databases (#22743) 2 years ago
fixture_generation.go Implement FSFE REUSE for golang files (#21840) 2 years ago
fixture_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
main_test.go Merge setting.InitXXX into one function with options (#24389) 2 years ago
migrate.go Add context parameter to some database functions (#26055) 2 years ago
migrate_test.go Add context parameter to some database functions (#26055) 2 years ago
org.go refactor some functions to support ctx as first parameter (#21878) 2 years ago
org_team.go Remove org users who belong to no teams (#24247) 2 years ago
org_team_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
org_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo.go Update tool dependencies, lock govulncheck and actionlint (#25655) 2 years ago
repo_collaboration.go refactor some functions to support ctx as first parameter (#21878) 2 years ago
repo_collaboration_test.go Rename `repo.GetOwner` to `repo.LoadOwner` (#22967) 2 years ago
repo_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo_transfer.go Fix unclear `IsRepositoryExist` logic (#24374) 2 years ago
repo_transfer_test.go Rename almost all Ctx functions (#22071) 2 years ago