Azure DevOps Advanced

Comprehensive Azure DevOps integration node

Pull Requests → Update

AI-generated

Summary

Updates an existing Azure DevOps pull request via a PATCH call, changing its title, description, status, and/or completion options. Returns the updated pull request object.

Inputs

  • project (required) — Azure DevOps project name or ID, used in the API path.
  • repositoryId (required) — ID or name of the Git repository containing the pull request.
  • pullRequestId (required) — Numeric ID of the pull request to update.
  • updateFields — Collection of optional fields. Title, Description and Status (active/abandoned/completed) are sent only when set (non-empty). Completion options: Merge Strategy (noFastForward/rebase/rebaseMerge/squash), Delete Source Branch, Transition Work Items, Bypass Policy, Bypass Reason, Merge Commit Message. If any completion option is added, a completionOptions object is sent; squashMerge is set true for squash and false for other strategies. Boolean options are included only if added to the collection.

Output shape

A single item containing the updated pull request JSON as returned by the Azure DevOps API.

Uses the node's PAT credential. Empty strings are skipped, so you can't clear a title or description with an empty value. With Continue On Fail enabled, errors are returned as an item with an error message. If no fields are set, an empty body is sent (the body is dropped) and the API will likely return the PR unchanged or an error. Setting Status to Completed with completion options is how a PR is merged. The Status option defaults to 'active', so adding it without changing it re-sets the status to active.

Examples

Example 1: Complete (merge) a PR with squash and delete the source branch

project=MyProject, repositoryId=my-repo, pullRequestId=42, updateFields: Status=Completed, Merge Strategy=Squash, Delete Source Branch=true

Example 2: Abandon a stale pull request

project, repositoryId, pullRequestId set; updateFields: Status=Abandoned

Example 3: Retitle a PR and rewrite its description

updateFields: Title='Fix login bug', Description set from a previous node's expression

Links

Discussion