Commit Status Publisher reports twice in the same PR Follow
Our team is using (roughly) the GitFlow pattern, wherein a short-lived feature branch is merged into a release branch via pull request (PR), then those commits are merged into the develop branch via anther PR.
On the PR from feature branch into release branch, TeamCity correctly reports back a single status for the unit tests, which were run on the refs/pull/*/merge branch.
But, on the PR from release to develop, TeamCity reports back two statuses for unit tests: one for the new refs/pull/*/merge branch, and another for the release branch. It should only be reporting the status for the new refs/pull/*/merge branch.
These duplicative statuses confuse our developers and make the PR look messy.
How can we prevent this from happening?
Please sign in to leave a comment.
Any insight would be appreciated.
It is important to note that the Commit Status Publisher will report the status of any commit, it isn't necessarily limited to only Pull Requests. If there are any commits happening on your release branch, the status report may be triggered. Sometimes this happens unintentionally, depending on how things are configured. With that in mind, I have a few questions to help me better understand your configuration.
In case you haven't seen our documentation on the Commit Status Publisher build feature, I'm including a link to that here: https://www.jetbrains.com/help/teamcity/commit-status-publisher.html#commit-status-publisher.md
Hi Eric, thanks for your response. Please find the answers to your questions below.
Are these two separate build configurations?
- No, the Details link next to each reported status go to different jobs that ran on two different branches (one to the refs/pull/*/merge branch and one to the release branch), but they are both of the same build configuration.
Are they part of a Build Chain or use any Snapshot Dependencies?
Is it correct that you are making the second pull request from the release branch to the dev branch?
Do you run any builds on the release branch itself and, if so, do you publish any statuses from those builds?
- Yes and yes.
I haven't been able to reproduce your issue. Would you be able to provide me with some screenshots of your build configuration settings using the Submit a Request button up on the top of the page? Also, the information from the Details link might be helpful if you're able to provide that as well.