title: How can I automatically build merge requests when using GitLab and TeamCity
body: <p>I'm using GitLab 8.3.2 and TeamCity 9.1.6. I've set up the JetBrains TeamCity CI service and it is triggering builds in TeamCity when changes are pushed to GitLab.</p>
  
  <p>I'd like it to also trigger a build when a merge request is created (my understanding is that this build could guarantee that hitting the merge button will not break things).</p>
  
  <p>I've got the branch specification in TeamCity set to:</p>
  
  <pre><code>+:refs/heads/*
  +:refs/(merge-requests/*)
  </code></pre>
  
  <p>I can see the merge requests in TeamCity, but they don't actually build.</p>
  
  <p>The merge request in GitLab says 'CI build pending for xxxx'. The view details link does not contain a build number though. I suspect this is because it searches TeamCity to find a matching build and doesn't find it because it wasn't triggered in the 1st place.</p>
  
  <p>I do not have any build triggers configured in TeamCity. (I did originally have a VCS trigger, but I turned it off once I realised that GitLab was triggering builds for me.)</p>
  
  <p>How can I set things up so that a merge request triggers a build in TeamCity and have GitLab display the result of the build in the merge request.</p>