Pending changes not building for Pull Requests


So I've seen the following posts (and I will be voting for  this one)

I have a similar problem, however, these posts have not catered for the exact issue.

In my VCS root branch spec I have +:refs/pull/*/head (and tried based on the above post +:(refs/pull/*/head) ), I have also tried with and without this filter in the trigger too.

When I first create a pull request in my source control (Gogs) from a feature branch, it picks up the changes perfectly and the build triggers. Great! A package is created and pushed to a Test environment.

However, if more work is required based on testing, changes will be made on the feature branch and pushed to the repo. In Gogs (just like in GitHub), I see the commits on the feature branch and if I look at the Pull Request page I equally see the pushed commits. However, these pushed changes fail to trigger a new build. If I try doing a 

git push origin HEAD:refs/heads/feature-branch-name

In the TC overview page I now see the link highlighting the pending changes, however, if click through the pending changes view under builds it just states "not triggered"

Lastly, I manually ran the build and select the PR along with the default option taking the latest changes from source control, when the build runs, it runs successfully but doesn't pick up the changes

Please can you suggest I to fix this? We are using version 10 


Comment actions Permalink

If you specified +:refs/pull/*/head in branch specification then TeamCity will watch for changes in these branches only. When a branch matched by this pattern is updated, TeamCity will detect a change and show it as pending. For TeamCity this branch is not special at all. When you run a build on this branch, then it will checkout SHA where this branch points, the same way as if you checked out this branch locally on your machine.


Comment actions Permalink

Hi Pavel

Thanks for the reply, however, that doesn't really help me, I'll simplify the issue. 

 - I create a feature branch called ft-mybranch
 - Do some changes, add, commit and push
 - I create a pull request in Gogs
 - Using +:refs/pull/*/head or +:(refs/pull/*/head) in my branch spec and the Trigger listens for any changes works just fine! TC picks up the pending changes and triggers a build. Perfect!
 - Now, say based on some QA work there are a few tweaks that need to be made, so i make the changes on the ft-mybranch branch
 - I then add, commit and push
 - Viewing the PR in Gogs shows my commit, Great!
 - TC doesn't pick up the pending changes nor does a build get triggered, Bad!

Can you suggest how I can fix this?

Cheers in advance


Please sign in to leave a comment.