Skip to content

CODEOWNERS trigger on PR update also activated by merge commit #34224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
splitt3r opened this issue Apr 16, 2025 · 3 comments · May be fixed by #34286
Open

CODEOWNERS trigger on PR update also activated by merge commit #34224

splitt3r opened this issue Apr 16, 2025 · 3 comments · May be fixed by #34286
Labels
Milestone

Comments

@splitt3r
Copy link
Contributor

splitt3r commented Apr 16, 2025

Description

The recent change in behaviour introduced in #33744 / reported by #33490 is also triggered by files which are changed in a merge commit (update branch button in the PR) but not really touched by the code changes in the PR. This leads to quite some mail / reviewer spam in our environment.

Steps to reproduce:

  • Create CODEOWNERS file for test.txt on main
  • Create PR which changes a file (not test.txt)
  • Change test.txt on main branch
  • Update PR branch via Gitea UI
  • Now the CODEOWNERS for test.txt will be assigned even if the PR does not change text.txt

Gitea Version

1.23.7

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?

Ubuntu installation

Database

None

@lunny
Copy link
Member

lunny commented Apr 21, 2025

When clicking update the branch, a new commit will be listed on the pull request commits tab like below.

Image

@splitt3r
Copy link
Contributor Author

splitt3r commented Apr 22, 2025

Exactly. So this is intended behaviour? The merge commit indeed touches the file. But the PR does not really change it.

@lunny
Copy link
Member

lunny commented Apr 22, 2025

Yes. The last commit of this PR is a merge commit which contains the change of the file. But from the PR's changed files, the file is not changed. Maybe it should always check the changed files but not pushed commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants