Azure DevOps · Arazzo Workflow

Azure DevOps Review the Oldest Active Pull Request

Version 1.0.0

List active pull requests, open the oldest, and add a review comment.

1 workflow 1 source API 1 provider
View Spec View on GitHub AgileCI/CDDevOpsProject ManagementVersion ControlArazzoWorkflows

Provider

microsoft-azure-devops

Workflows

review-oldest-active-pull-request
Find the oldest active pull request and add a review comment.
Lists active pull requests, and when at least one exists, gets the first one and posts a review comment thread.
3 steps inputs: accessToken, apiVersion, commentText, repositoryId outputs: pullRequestId, threadId, title
1
listActivePullRequests
List active pull requests in the repository, returning the oldest first.
2
getPullRequest
Fetch the selected pull request with its commits expanded so the reviewer has full context.
3
addReviewComment
Post an active comment thread asking for a review on the selected pull request.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Azure DevOps Review the Oldest Active Pull Request
  summary: List active pull requests, open the oldest, and add a review comment.
  description: >-
    Drives a lightweight review-queue pattern over Azure Repos. The workflow
    lists active pull requests in a repository, branches on whether any are open,
    fetches the first (oldest) active pull request with its commits expanded, and
    posts an active comment thread asking for a review. Every step spells out its
    request inline so the flow can be read and executed without opening the
    underlying OpenAPI description.
  version: 1.0.0
  x-realizes-capability-ids:
  - BC-4200.40
  x-capability-derivation:
    method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
    min_confidence: 0.7
    sources:
    - capability_id: BC-4200.40
      capability_name: Software Construction Management
      spec: microsoft-azure-devops-pull-requests-api-openapi.yml
      confidence: 0.9
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: pullRequestsApi
  url: ../openapi/microsoft-azure-devops-pull-requests-api-openapi.yml
  type: openapi
workflows:
- workflowId: review-oldest-active-pull-request
  summary: Find the oldest active pull request and add a review comment.
  description: >-
    Lists active pull requests, and when at least one exists, gets the first one
    and posts a review comment thread.
  inputs:
    type: object
    required:
    - apiVersion
    - repositoryId
    - commentText
    properties:
      apiVersion:
        type: string
        description: Azure DevOps REST API version (e.g. 7.1).
      repositoryId:
        type: string
        description: Repository ID or name to scan for active pull requests.
      commentText:
        type: string
        description: Review comment to post on the selected pull request.
      accessToken:
        type: string
        description: Azure DevOps bearer (OAuth 2.0) access token.
  steps:
  - stepId: listActivePullRequests
    description: >-
      List active pull requests in the repository, returning the oldest first.
    operationId: pullRequests_list
    parameters:
    - name: api-version
      in: query
      value: $inputs.apiVersion
    - name: repositoryId
      in: path
      value: $inputs.repositoryId
    - name: searchCriteria.status
      in: query
      value: active
    - name: $top
      in: query
      value: 1
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      oldestPullRequestId: $response.body#/value/0/pullRequestId
      activeCount: $response.body#/count
    onSuccess:
    - name: hasActive
      type: goto
      stepId: getPullRequest
      criteria:
      - context: $response.body
        condition: $.value.length > 0
        type: jsonpath
    - name: noneActive
      type: end
      criteria:
      - context: $response.body
        condition: $.value.length == 0
        type: jsonpath
  - stepId: getPullRequest
    description: >-
      Fetch the selected pull request with its commits expanded so the reviewer
      has full context.
    operationId: pullRequests_get
    parameters:
    - name: api-version
      in: query
      value: $inputs.apiVersion
    - name: repositoryId
      in: path
      value: $inputs.repositoryId
    - name: pullRequestId
      in: path
      value: $steps.listActivePullRequests.outputs.oldestPullRequestId
    - name: includeCommits
      in: query
      value: true
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      title: $response.body#/title
      sourceRefName: $response.body#/sourceRefName
  - stepId: addReviewComment
    description: >-
      Post an active comment thread asking for a review on the selected pull
      request.
    operationId: pullRequests_addComment
    parameters:
    - name: api-version
      in: query
      value: $inputs.apiVersion
    - name: repositoryId
      in: path
      value: $inputs.repositoryId
    - name: pullRequestId
      in: path
      value: $steps.listActivePullRequests.outputs.oldestPullRequestId
    requestBody:
      contentType: application/json
      payload:
        comments:
        - parentCommentId: 0
          content: $inputs.commentText
          commentType: text
        status: active
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      threadId: $response.body#/id
  outputs:
    pullRequestId: $steps.listActivePullRequests.outputs.oldestPullRequestId
    title: $steps.getPullRequest.outputs.title
    threadId: $steps.addReviewComment.outputs.threadId

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/microsoft-azure-devops-pull-request-review-cycle-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.