title: Azure DevOps REST API Perform Git Merge
body: <p>I am trying to merge a branch using the NodeJS SDK for the Azure DevOps REST API.</p>
  <p>I have the following typescript code using the Azure DevOps Node SDK (<a href="https://www.npmjs.com/package/azure-devops-node-api" rel="nofollow noreferrer">https://www.npmjs.com/package/azure-devops-node-api</a>)</p>
  <pre><code>  // get master commit
    const masterRef = (await gitApi.getRefs(repository.id!, devOps.projectName, 'heads/master'))[0];
  
    // merge branch into master
    let merge = await gitApi.createMergeRequest(
      {
        comment: 'Merge',
        parents: [branchLatestCommitId, masterRef.objectId!]
      },
      devOps.projectName,
      repository.id!
    );
  
  </code></pre>
  <p>And I can see in the console when I print the result of the merge object (with a status of 3, indicating Completed):</p>
  <pre><code>Object
  comment: &quot;Merge&quot;
  detailedStatus: {mergeCommitId: &quot;faaeb4adef7640d9dac56592ef96e2535dd46078&quot;}
  mergeOperationId: 38
  parents: (2) [&quot;67f62907ec3ab10afc8452a649bf010e02d38af9&quot;, &quot;8ac25ac12c7e9b28195aa64ed7a23d3939a3491d&quot;]
  status: 3
  __proto__: Object
  </code></pre>
  <p>Alas...nothing has changed in my git repository. The branch is still there, unmerged into master.</p>