Issue with TeamCity's Change Detection for Pull Requests
I am facing an issue with TeamCity's change detection when dealing with pull requests (pull/*/head). It seems that TeamCity is incorrectly identifying the list of changes, leading to unnecessary trigger activations when we intend to specify masks for modified files.
Here's a specific scenario to illustrate the problem: when changes are pushed to the master branch, including modifications to a CPP file, and we subsequently create a PR from that branch (for example only with one XML), TeamCity incorrectly reports that the PR also contains changes to CPP files.
Ideally, when a build is triggered, TeamCity should correctly identify the revision of the branch from which the PR was created.
Is this normal behavior or a bug?
Thank you in advance for your support.
Please sign in to leave a comment.
And the answer is:
Build -> Version Control Settings -> Additional Options -> Exclude default branch changes from other branches
By default, when displaying pending changes in a feature branch or changes of a build on a branch, TeamCity includes changes in the default branch (till a build in the default branch) as well. This allows tracking the cases when a commit that broke a build was fixed in the default branch, but not in a feature branch.
Maybe it will be useful for someone.