capabilities.work

Complete a Pull Request

A 2-step recipe with Azure DevOps. We can help you get access.

Recipe · 2 steps

Complete a Pull Request

with Azure DevOps · Software Construction Management

Verify a pull request can merge, then complete it.

  1. Fetch the pull request to read its merge status and the head commit of the source branch needed to complete it.
  2. Patch the pull request to status completed, supplying the required source head commit and the requested completion options.
What you'll need to have ready
  • apiVersion: Azure DevOps REST API version (e.g. 7.1).
  • repositoryId: Repository ID or name containing the pull request.
  • pullRequestId: Numeric ID of the pull request to complete.
  • deleteSourceBranch: Whether to delete the source branch on completion.
  • squashMerge: Whether to squash the source commits into a single commit.
  • accessToken: Azure DevOps bearer (OAuth 2.0) access token.
For your developer

Arazzo workflow microsoft-azure-devops:complete-pull-request, 2 operations: pullRequests_get → pullRequests_update. Specs on APIs.io.