TeamCity can't find head commit on GitHub PR

We have TeamCity watching a GitHub repo and building pull requests using the PR build feature. When we create a PR to merge into master, the PR get's built ok & it updates the commit status at GitHub which causes the check on the PR to allow the PR to be merged.

However, if when the merge a PR into a release branch with a merge commit, then merge this branch into master, TeamCity can't calculate the head commit of the release branch correctly. it sees the commit but updates the previous commit. never updating the head commit.

How can we make TeamCity behave and see the correct commit. This is a log fragment of the incident.

Compute revision for 'Branch Monitor'
 
14:31:12
Upper limit revision: 6d314e5f2f2f429cf24679d4b000d0a07d1bb8d8
14:31:12
The first revision that was detected in the branch refs/pull/335/head: 6d314e5f2f2f429cf24679d4b000d0a07d1bb8d8
14:31:12
Latest commit attached to build configuration (with id <= 133071): 935ad36934b757d15c44f29d2f0ba47175d225a6
14:31:12
Computed revision: 935ad36934b757d15c44f29d2f0ba47175d225a6
and
git fetch' required: commit '935ad36934b757d15c44f29d2f0ba47175d225a6' is in the local repository clone, but 'refs/pull/335/head' points another commit '6d314e5f2f2f429cf24679d4b000d0a07d1bb8d8'.

Please sign in to leave a comment.