-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
Description
When a new PR is opened the CODEOWNERS functionality tests against the diff towards refs/heads/ as seen here:
Line 920 in 7fd0a5b
changedFiles, err := repo.GetFilesChangedBetween(git.BranchPrefix+pr.BaseBranch, pr.GetGitRefName()) |
This means that if the source branch for the PR is not up to date with the target the diff will contain all the changes added to the target branch since merge base - this seems like the wrong behavior to me.
I think it should use merge base instead of head - which i also assume is the logic used to determine which changes needs to be reviewed in a PR.
I am not familiar with the codebase of gitea, so i am not comfortable make the pr to change this, but if it is agreed that this change should be made, and nobody else has the bandwidth to do it, i might give it a try.
Gitea Version
1.21.8
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Not relevant
Database
MySQL/MariaDB