TeamCity
 
You are viewing the documentation for an earlier version of TeamCity. View this page in the current documentation

Pull Requests

The Pull Requests build feature lets you automatically load pull request (or merge requests in case of GitLab) information and run builds on pull request branches in GitHub, Bitbucket Server, and GitLab.

The feature extends the original branch specification of the VCS roots, attached to the current build configuration, to include pull requests that match the specified filtering criteria. It monitors builds only on head branches:

  • For GitHub: refs/pull/*/head

  • For Bitbucket Server: refs/pull-requests/*/from

  • For GitLab: refs/merge-requests/*/head

If you configure a VCS trigger for your build configuration, TeamCity will automatically run builds on changes detected in the monitored branches.

You can find the pull request's details displayed on the Overview tab of the Build Results:

Pull request details

When adding this build feature, you need to specify a VCS root and select a VCS hosting type.

The build feature parameters depend on the selected VCS hosting type.

See the example on how to set up TeamCity to run builds on pull requests.