title: Integrating GitLab with TeamCity
body: <p>Since GitLab 7.6, or thereabouts, there is a new option to use TeamCity directly from GitLab projects. In the setup there is this message: </p>
  
  <blockquote>
    <p>The build configuration in Teamcity must use the build format number
    %build.vcs.number% you will also want to configure monitoring of all
    branches so merge requests build, that setting is in the vsc root
    advanced settings.</p>
  </blockquote>
  
  <p>I'm not sure how this works. Lets say I have a repository Foo. </p>
  
  <p>I have setup a build on TeamCity to listen to Foo with branch specification: <code>+:refs/pull/*/merge</code></p>
  
  <p>I then fork Foo in gitlab as FooFork, make a change, then request a merge FooFork -> Foo. </p>
  
  <p>But nothing happens to test this merge, which is what I was expecting GitLab to do. If I accept the merge than the build server jumps into action (immediately) and builds twice (<code>master</code> and <code>/ref/master</code>).</p>
  
  <p>I've also set the build configuration to use exactly: %build.vcs.number% as the build number as prescribed, but gitlab doesn't seem to give me any information about the build result. </p>
  
  <p>So I'm a bit confused really as to what exactly this GitLab -> TeamCity integration is supposed to do and whether I'm doing wrong. </p>
  
  <p>I'm currently running GitLab 7.9 and TeamCity 8.1.4</p>
  
  <p>Update: </p>
  
  <p>Seems this use case was not supported prior to version 8 - <a href="https://github.com/gitlabhq/gitlabhq/issues/7240" rel="noreferrer">https://github.com/gitlabhq/gitlabhq/issues/7240</a> </p>