You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Fix#29763
This PR fixes 2 problems with CodeOwner in the pull request.
- Don't use the pull request base branch but merge-base as a diff base to
detect the code owner.
- CodeOwner detection in fork repositories will be disabled because
almost all the fork repositories will not change CODEOWNERS files but it
should not be used on fork repositories' pull requests.
---------
Co-authored-by: wxiaoguang <[email protected]>
lunny
added a commit
to lunny/gitea
that referenced
this issue
Mar 15, 2024
Fixgo-gitea#29763
This PR fixes 2 problems with CodeOwner in the pull request.
- Don't use the pull request base branch but merge-base as a diff base to
detect the code owner.
- CodeOwner detection in fork repositories will be disabled because
almost all the fork repositories will not change CODEOWNERS files but it
should not be used on fork repositories' pull requests.
---------
Co-authored-by: wxiaoguang <[email protected]>
Fix#29763
Backport #29783
This PR fixes 2 problems with CodeOwner in the pull request.
- Don't use the pull request base branch but merge-base as a diff base
to detect the code owner.
- CodeOwner detection in fork repositories will be disabled because
almost all the fork repositories will not change CODEOWNERS files but it
should not be used on fork repositories' pull requests.
---------
Co-authored-by: wxiaoguang <[email protected]>
go-gitea
locked as resolved and limited conversation to collaborators
Jun 13, 2024
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
When a new PR is opened the CODEOWNERS functionality tests against the diff towards refs/heads/ as seen here:
gitea/models/issues/pull.go
Line 920 in 7fd0a5b
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
The text was updated successfully, but these errors were encountered: