Skip to content

Closed PRs getting picked up by build servers monitoring Gitea repos with Gitea 1.19 #24213

Closed
@parnic-sks

Description

@parnic-sks

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:

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions