Q:

Teamcity trigger builds for github pull-requests

I want to build each pull request merged with master. I have setup teamcity the following way:
http://blog.jetbrains.com/teamcity/2013/02/automatically-building-pull-requests-from-github-with-teamcity/
Branch specification:
+:refs/pull/(*/merge)
Default branch:
master
I have setup github teamcity Service Hook.
http://www.jaxzin.com/2011/02/teamcity-build-triggering-by-github.html
When I enable the teamcity hook. The job recognizes the change but the build stays in 'pending' and is not triggered. Do I need to setup a VCS Trigger?
I tried setting-up without the teamcity service hook, but builds for all the Pull-Requests are re-triggered whenever a new PR is submitted. The builds also get triggered on PRs which are closed.
Can someone please share their configuration to trigger the build only once and not build any closed PRs?

A:

There is no need in TeamCity GitHub hook, you can go with simple VCS trigger.
All active branches will be triggered on first start. From docs:

A branch considered active if:

it is present in the VCS repository and has recent commits (i.e.
  commits with the age less than the value of
  teamcity.activeVcsBranch.age.days parameter, 7 days by default). or it
has recent builds (i.e. builds with the age less than the value of
  teamcity.activeBuildBranch.age.hours parameter, 24 hours by default).

Try to just wait until it's done or cancel all builds.
Hope it helps.

