capabilities.work

Open a Pull Request and Start a Review Thread

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

Recipe · 3 steps

Open a Pull Request and Start a Review Thread

with Azure DevOps · Software Construction Management

Create a pull request, confirm it, and add an opening comment thread.

  1. Create the pull request between the supplied source and target branches.
  2. Fetch the pull request to confirm it is active and capture the head commit of the source branch for later completion.
  3. Post an active comment thread on the pull request to start the review.
What you'll need to have ready
  • apiVersion: Azure DevOps REST API version (e.g. 7.1).
  • repositoryId: Repository ID or name to open the pull request in.
  • title: Title for the pull request.
  • description: Optional description for the pull request.
  • sourceRefName: Source branch ref (e.g. refs/heads/feature/login).
  • targetRefName: Target branch ref (e.g. refs/heads/main).
  • commentText: Opening review comment to post on the pull request.
  • accessToken: Azure DevOps bearer (OAuth 2.0) access token.
For your developer

Arazzo workflow microsoft-azure-devops:open-pull-request-and-comment, 3 operations: pullRequests_create → pullRequests_get → pullRequests_addComment. Specs on APIs.io.