Description
Description
We recently upgraded from Gitea 1.18.5 to Gitea 1.19.1, and our TeamCity server has started queuing builds for a number of closed PRs for no discernable reason. No changes are being pushed to these PRs, in fact some of the PRs's branches have been deleted.
I haven't been able to track down the specific details of what's going on, but I can see on the Gitea host filesystem that the directory under repositories/org/repo/refs/pull for the closed PR is getting re-created with the "head" file containing a commit hash that doesn't belong to that branch at all (it seems to always belong to our default 'main' branch instead).
Our only fix has been to constantly monitor TeamCity for queueing builds on closed PRs and canceling them, then fully Deleting the closed PR in Gitea. This is causing a significant problem for us at the moment, so if there's a commit I can cherry-pick to manually build and deploy a fix, we'd be very happy to do that.
This only applies to PRs that are closed, it is not happening with open or merged ones.
I found some issues/PRs that sound possibly related:
- Closed PRs trigger synchronize webhooks when new PR with same branch name is created #23707
- Fix cannot reopen after pushing commits to a closed PR #23189
Gitea Version
1.19.1
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Hand-built 1.19.1 with one local modification, running on an arm64 AWS EC2 instance.
Database
PostgreSQL