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
PRs that were previously closed unmerged will trigger webhook of synchronize type when new PR is opened with same branch name. This is directly caused by #23189
If a user has CI integration configured, this will cause additional jobs to be spawned for each closed (but unmerged) PR that matches branch name of newly created PRs. In extreme cases this can be in hundreds. In such case, closed PRs will also inherit all status checks from new PRs, overwriting previous status checks.
Several tools such as RenovateBot reuse same branch name when creating PRs and it is not uncommon to sometimes close (aka ignore update) PRs created by Renovate.
For now, proposed fix would be to skip synchronize event on closed PRs, however this is very much a temporary band-aid and there are more code paths that might get confused by behavior change introduced by #23189.
I am not entirely sure how one could attempt to fix it. The only one possible solution I can think of would still result in PR that can not be reopened in case when source branch was force-pushed to.
Additionally, I do not believe closed PRs should be reopenable in all conditions, especially when source branch head has changed while PR was in closed state as that usually indicates that while branch name is identical, its content is very likely not applicable to closed PR and name collision is just coincidental.
Gitea Version
1.19
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?
gitea/gitea:1.19-rootless
Database
None
The text was updated successfully, but these errors were encountered:
…3834)
Backport #23782 by @sillyguodongFix#23707
Cause by #23189
This PR is a quick fix that, when pushing commits to closed PR, webhook
and actions also be triggered.
Co-authored-by: sillyguodong <33891828+sillyguodong@users.noreply.github.com>
Description
PRs that were previously closed unmerged will trigger webhook of
synchronize
type when new PR is opened with same branch name. This is directly caused by #23189If a user has CI integration configured, this will cause additional jobs to be spawned for each closed (but unmerged) PR that matches branch name of newly created PRs. In extreme cases this can be in hundreds. In such case, closed PRs will also inherit all status checks from new PRs, overwriting previous status checks.
Several tools such as RenovateBot reuse same branch name when creating PRs and it is not uncommon to sometimes close (aka ignore update) PRs created by Renovate.
For now, proposed fix would be to skip
synchronize
event on closed PRs, however this is very much a temporary band-aid and there are more code paths that might get confused by behavior change introduced by #23189.I am not entirely sure how one could attempt to fix it. The only one possible solution I can think of would still result in PR that can not be reopened in case when source branch was force-pushed to.
Additionally, I do not believe closed PRs should be reopenable in all conditions, especially when source branch head has changed while PR was in closed state as that usually indicates that while branch name is identical, its content is very likely not applicable to closed PR and name collision is just coincidental.
Gitea Version
1.19
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?
gitea/gitea:1.19-rootless
Database
None
The text was updated successfully, but these errors were encountered: