Affected versions: 2026.2
Problem
TeamCity unexpectedly triggers a build when a VCS trigger has a +pr:* branch filter and a previously merged and deleted pull request (PR) source branch is recreated with the same name, even though no new PR is open.
This can occur when a build configuration is set to trigger only on pull requests or commits to the default branch.
The triggered build may also display Pull Request Details from the previously merged PR.
Cause
This behaviour is associated with a known TeamCity issue, New builds are triggered by +pr:* VCS trigger on closed PRs if PRs on source branches are used and covered by the branchspec.
When the Pull Requests build feature uses source branches and the VCS root branch specification includes those branches, TeamCity may incorrectly associate a recreated branch with a previously closed PR.
As a result, the +pr:* VCS trigger can start a build even though there is no active pull request.
Resolution
Upgrade TeamCity to a version containing the fix for New builds are triggered by +pr:* VCS trigger on closed PRs if PRs on source branches are used and covered by the branchspec.
Fixed in: TeamCity 2026.2.1 (239120)
As a workaround, review the VCS root Branch specification and ensure that regular feature branches are not unnecessarily included when builds should only run for active pull requests.
For example, check for broad branch specifications such as +:refs/heads/* that may overlap with branches managed by the Pull Requests build feature.
Comments
0 comments
Please sign in to leave a comment.