# Azure DevOps

> Work with Azure Boards, Repos and Pipelines from a workflow: create, update, query and comment on work items; list branches and commits; open, review, comment on and complete pull requests; and start pipeline runs and follow them to a result.

App · Code Repositories · 20 actions. Web page: https://docs.lodol.com/docs/integrations/azure-devops

## Actions

### Comment on a pull request

Start a new comment thread on a pull request's overview.

**Inputs**

- Project (`project`, text, required): The Azure DevOps project, by name.
- Repository (`repository`, text, required): Pick a repository after choosing the project, or type its name or id.
- Pull request ID (`pull_request_id`, text, required): The pull request's number, or its Azure DevOps link.
- Comment (`content`, text, required): The comment, in Markdown.
- Thread status (`thread_status`, text): Defaults to Active. One of: `active`, `pending`, `fixed` (Resolved), `wontFix` (Won't fix), `byDesign` (By design), `closed`.

**Outputs**

- `author` (text)
- `comment_id` (text)
- `content` (text)
- `published_date` (text)
- `pull_request_id` (text)
- `status` (text)
- `thread_id` (text)

**Example output**

```json
{
  "author": "Jamal Hartnett",
  "comment_id": "1",
  "content": "Looks good once the tests pass.",
  "published_date": "2026-09-22T09:30:00Z",
  "pull_request_id": "22",
  "status": "active",
  "thread_id": "148"
}
```

### Comment on a work item

Add a comment to a work item's discussion.

**Inputs**

- Project (`project`, text, required): The Azure DevOps project, by name.
- Work item ID (`work_item_id`, text, required): The work item's number, or its Azure DevOps link.
- Comment (`comment`, text, required): The comment. Basic HTML is kept.

**Outputs**

- `comment` (text)
- `rev` (number)
- `url` (text)
- `work_item_id` (text)

**Example output**

```json
{
  "comment": "Release notes drafted.",
  "rev": 3,
  "url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_workitems/edit/131",
  "work_item_id": "131"
}
```

### Create a pull request

Open a pull request from one branch into another.

**Inputs**

- Project (`project`, text, required): The Azure DevOps project, by name.
- Repository (`repository`, text, required): Pick a repository after choosing the project, or type its name or id.
- Source branch (`source_branch`, text, required): The branch with the changes, e.g. feature/export.
- Target branch (`target_branch`, text): Defaults to the repository's default branch.
- Title (`title`, text, required): The pull request's title.
- Description (`description`, text): Markdown, up to 4,000 characters.
- Draft (`is_draft`, true/false): Open it as a draft, so reviewers are not asked yet. Default: `false`.
- Reviewer IDs (`reviewer_ids`, list): Reviewers' Azure DevOps user ids (GUIDs). 'Get a pull request' lists reviewers with their ids.
- Work item IDs (`work_item_ids`, list): Work items to link to the pull request.

**Outputs**

- `closed_date` (text)
- `created_by` (text)
- `created_by_email` (text)
- `creation_date` (text)
- `description` (text)
- `id` (text)
- `is_draft` (true/false)
- `last_merge_source_commit` (text)
- `merge_status` (text)
- `project` (text)
- `repository_id` (text)
- `repository_name` (text)
- `reviewers` (list)
- `source_branch` (text)
- `source_ref_name` (text)
- `status` (text)
- `target_branch` (text)
- `target_ref_name` (text)
- `title` (text)
- `url` (text)
- `work_item_ids` (list)

**Example output**

```json
{
  "closed_date": null,
  "created_by": "Jamal Hartnett",
  "created_by_email": "jamal@fabrikam.com",
  "creation_date": "2026-09-22T09:10:00Z",
  "description": "Adds a CSV export to the reports page.",
  "id": "22",
  "is_draft": false,
  "last_merge_source_commit": "b60280bc6e62e2f880f1b63c1e24987664d3bda3",
  "merge_status": "succeeded",
  "project": "Fabrikam-Fiber",
  "repository_id": "5febef5a-833d-4e14-b9c0-14cb638f91e6",
  "repository_name": "Fabrikam-Fiber",
  "reviewers": [
    {
      "display_name": "Normal Paulk",
      "id": "d6245f20-2af8-44f4-9451-8107cb2767db",
      "is_required": false,
      "unique_name": "normal@fabrikam.com",
      "vote": 0,
      "vote_label": "no vote"
    }
  ],
  "source_branch": "feature/export",
  "source_ref_name": "refs/heads/feature/export",
  "status": "active",
  "target_branch": "main",
  "target_ref_name": "refs/heads/main",
  "title": "Add CSV export",
  "url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_git/Fabrikam-Fiber/pullrequest/22",
  "work_item_ids": [
    "131"
  ]
}
```

### Create a work item

Create a work item: a Task, Bug, User Story or any type the project has.

**Inputs**

- Project (`project`, text, required): The Azure DevOps project, by name.
- Type (`work_item_type`, text, required): Pick a type after choosing the project.
- Title (`title`, text, required): The work item's title.
- Description (`description`, text): The description. Basic HTML such as <b> and <ul> is kept.
- Assigned to (`assigned_to`, text): The person's email address as it appears in Azure DevOps.
- State (`state`, text): e.g. New, Active, Closed. Must be a state of this type and, on an update, a valid next step from the current one.
- Priority (`priority`, text): 1 is the highest. One of: `1` (1 (highest)), `2` (2 (high)), `3` (3 (medium)), `4` (4 (low)).
- Tags (`tags`, list): Tags to set. On an update this replaces the item's tags.
- Area path (`area_path`, text): e.g. MyProject\Web. Defaults to the project's root area.
- Iteration path (`iteration_path`, text): e.g. MyProject\Sprint 12. Defaults to the project's root.
- Other fields (`additional_fields`, object): Any other fields, keyed by reference name, e.g. {"Microsoft.VSTS.Scheduling.StoryPoints": 3}.

**Outputs**

- `area_path` (text)
- `assigned_to` (text)
- `assigned_to_email` (text)
- `changed_date` (text)
- `created_by` (text)
- `created_date` (text)
- `description` (text)
- `fields` (object)
- `id` (text)
- `iteration_path` (text)
- `priority` (number)
- `project` (text)
- `reason` (text)
- `rev` (number)
- `state` (text)
- `tags` (list)
- `title` (text)
- `url` (text)
- `work_item_type` (text)

**Example output**

```json
{
  "area_path": "Fabrikam-Fiber",
  "assigned_to": "Jamal Hartnett",
  "assigned_to_email": "jamal@fabrikam.com",
  "changed_date": "2026-09-22T09:00:00.000Z",
  "created_by": "Jamal Hartnett",
  "created_date": "2026-09-22T09:00:00.000Z",
  "description": "<div>Cover the new export feature.</div>",
  "fields": {
    "System.State": "New",
    "System.Title": "Update the release notes",
    "System.WorkItemType": "Task"
  },
  "id": "131",
  "iteration_path": "Fabrikam-Fiber\\Sprint 12",
  "priority": 2,
  "project": "Fabrikam-Fiber",
  "reason": "New",
  "rev": 1,
  "state": "New",
  "tags": [
    "docs"
  ],
  "title": "Update the release notes",
  "url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_workitems/edit/131",
  "work_item_type": "Task"
}
```

### Delete a work item

Delete a work item. By default it goes to the project's Recycle Bin, where it can be restored.

**Inputs**

- Project (`project`, text, required): The Azure DevOps project, by name.
- Work item ID (`work_item_id`, text, required): The work item's number, or its Azure DevOps link.
- Delete permanently (`permanently`, true/false): Skip the Recycle Bin. This cannot be undone, and needs the 'Permanently delete work items' permission. Default: `false`.

**Outputs**

- `deleted` (true/false)
- `deleted_by` (text)
- `deleted_date` (text)
- `id` (text)
- `permanently` (true/false)

**Example output**

```json
{
  "deleted": true,
  "deleted_by": "Jamal Hartnett",
  "deleted_date": "2026-09-22T10:00:00Z",
  "id": "131",
  "permanently": false
}
```

### Get a pipeline run

Get a pipeline run's state and, once finished, its result.

**Inputs**

- Project (`project`, text, required): The Azure DevOps project, by name.
- Pipeline (`pipeline_id`, text, required): Pick a pipeline after choosing the project, or type its id (the definitionId in the pipeline's address).
- Run ID (`run_id`, text, required): The run's id, or its Azure DevOps link (buildId=...).

**Outputs**

- `created_date` (text)
- `finished_date` (text)
- `id` (text)
- `name` (text)
- `pipeline_id` (text)
- `pipeline_name` (text)
- `result` (text)
- `state` (text)
- `template_parameters` (object)
- `url` (text)

**Example output**

```json
{
  "created_date": "2026-09-22T09:20:00Z",
  "finished_date": "2026-09-22T09:25:00Z",
  "id": "345",
  "name": "20260922.1",
  "pipeline_id": "12",
  "pipeline_name": "Fabrikam-Fiber CI",
  "result": "succeeded",
  "state": "completed",
  "template_parameters": {},
  "url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_build/results?buildId=345"
}
```

### Get a pull request

Get one pull request with its reviewers, votes and linked work items.

**Inputs**

- Project (`project`, text, required): The Azure DevOps project, by name.
- Repository (`repository`, text, required): Pick a repository after choosing the project, or type its name or id.
- Pull request ID (`pull_request_id`, text, required): The pull request's number, or its Azure DevOps link.

**Outputs**

- `closed_date` (text)
- `created_by` (text)
- `created_by_email` (text)
- `creation_date` (text)
- `description` (text)
- `id` (text)
- `is_draft` (true/false)
- `last_merge_source_commit` (text)
- `merge_status` (text)
- `project` (text)
- `repository_id` (text)
- `repository_name` (text)
- `reviewers` (list)
- `source_branch` (text)
- `source_ref_name` (text)
- `status` (text)
- `target_branch` (text)
- `target_ref_name` (text)
- `title` (text)
- `url` (text)
- `work_item_ids` (list)

**Example output**

```json
{
  "closed_date": null,
  "created_by": "Jamal Hartnett",
  "created_by_email": "jamal@fabrikam.com",
  "creation_date": "2026-09-22T09:10:00Z",
  "description": "Adds a CSV export to the reports page.",
  "id": "22",
  "is_draft": false,
  "last_merge_source_commit": "b60280bc6e62e2f880f1b63c1e24987664d3bda3",
  "merge_status": "succeeded",
  "project": "Fabrikam-Fiber",
  "repository_id": "5febef5a-833d-4e14-b9c0-14cb638f91e6",
  "repository_name": "Fabrikam-Fiber",
  "reviewers": [
    {
      "display_name": "Normal Paulk",
      "id": "d6245f20-2af8-44f4-9451-8107cb2767db",
      "is_required": false,
      "unique_name": "normal@fabrikam.com",
      "vote": 0,
      "vote_label": "no vote"
    }
  ],
  "source_branch": "feature/export",
  "source_ref_name": "refs/heads/feature/export",
  "status": "active",
  "target_branch": "main",
  "target_ref_name": "refs/heads/main",
  "title": "Add CSV export",
  "url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_git/Fabrikam-Fiber/pullrequest/22",
  "work_item_ids": [
    "131"
  ]
}
```

### Get a work item

Get one work item with all its fields.

**Inputs**

- Project (`project`, text, required): The Azure DevOps project, by name.
- Work item ID (`work_item_id`, text, required): The work item's number, or its Azure DevOps link.

**Outputs**

- `area_path` (text)
- `assigned_to` (text)
- `assigned_to_email` (text)
- `changed_date` (text)
- `created_by` (text)
- `created_date` (text)
- `description` (text)
- `fields` (object)
- `id` (text)
- `iteration_path` (text)
- `priority` (number)
- `project` (text)
- `reason` (text)
- `rev` (number)
- `state` (text)
- `tags` (list)
- `title` (text)
- `url` (text)
- `work_item_type` (text)

**Example output**

```json
{
  "area_path": "Fabrikam-Fiber",
  "assigned_to": "Jamal Hartnett",
  "assigned_to_email": "jamal@fabrikam.com",
  "changed_date": "2026-09-22T09:00:00.000Z",
  "created_by": "Jamal Hartnett",
  "created_date": "2026-09-22T09:00:00.000Z",
  "description": "<div>Cover the new export feature.</div>",
  "fields": {
    "System.State": "New",
    "System.Title": "Update the release notes",
    "System.WorkItemType": "Task"
  },
  "id": "131",
  "iteration_path": "Fabrikam-Fiber\\Sprint 12",
  "priority": 2,
  "project": "Fabrikam-Fiber",
  "reason": "New",
  "rev": 1,
  "state": "New",
  "tags": [
    "docs"
  ],
  "title": "Update the release notes",
  "url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_workitems/edit/131",
  "work_item_type": "Task"
}
```

### List branches

List a repository's branches.

**Inputs**

- Project (`project`, text, required): The Azure DevOps project, by name.
- Repository (`repository`, text, required): Pick a repository after choosing the project, or type its name or id.
- Name contains (`contains`, text): Only branches whose name contains this text.
- Maximum results (`max_results`, number): Defaults to 100 if left blank. From 1 to 1000.

**Outputs**

- `count` (number)
- `items` (list)

**Example output**

```json
{
  "count": 1,
  "items": [
    {
      "creator": "Jamal Hartnett",
      "is_locked": false,
      "name": "feature/export",
      "object_id": "b60280bc6e62e2f880f1b63c1e24987664d3bda3",
      "ref_name": "refs/heads/feature/export"
    }
  ]
}
```

### List commits

List a repository's commits, newest first.

**Inputs**

- Project (`project`, text, required): The Azure DevOps project, by name.
- Repository (`repository`, text, required): Pick a repository after choosing the project, or type its name or id.
- Branch (`branch`, text): Defaults to the repository's default branch.
- Author (`author`, text): Only commits by this author (name or email).
- From (`from_date`, date and time): Only commits made on or after this moment.
- To (`to_date`, date and time): Only commits made on or before this moment.
- Path (`item_path`, text): Only commits touching this file or folder, e.g. /src/app.py.
- Maximum results (`max_results`, number): Defaults to 100 if left blank. From 1 to 1000.
- Skip (`skip`, number): How many results to skip, to page past ones already fetched. At least 0.

**Outputs**

- `count` (number)
- `items` (list)

**Example output**

```json
{
  "count": 1,
  "items": [
    {
      "author_date": "2026-09-21T16:30:00Z",
      "author_email": "jamal@fabrikam.com",
      "author_name": "Jamal Hartnett",
      "change_counts": {
        "Add": 1,
        "Edit": 2
      },
      "comment": "Add CSV export",
      "comment_truncated": false,
      "commit_id": "b60280bc6e62e2f880f1b63c1e24987664d3bda3",
      "committer_date": "2026-09-21T16:30:00Z",
      "committer_name": "Jamal Hartnett",
      "url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_git/Fabrikam-Fiber/commit/b60280bc6e62e2f880f1b63c1e24987664d3bda3"
    }
  ]
}
```

### List pipeline runs

List a pipeline's runs, newest first.

**Inputs**

- Project (`project`, text, required): The Azure DevOps project, by name.
- Pipeline (`pipeline_id`, text, required): Pick a pipeline after choosing the project, or type its id (the definitionId in the pipeline's address).
- Maximum results (`max_results`, number): Defaults to 100 if left blank. From 1 to 1000.

**Outputs**

- `count` (number)
- `items` (list)

**Example output**

```json
{
  "count": 1,
  "items": [
    {
      "created_date": "2026-09-22T09:20:00Z",
      "finished_date": null,
      "id": "345",
      "name": "20260922.1",
      "pipeline_id": "12",
      "pipeline_name": "Fabrikam-Fiber CI",
      "result": null,
      "state": "inProgress",
      "template_parameters": {},
      "url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_build/results?buildId=345"
    }
  ]
}
```

### List pipelines

List a project's pipelines.

**Inputs**

- Project (`project`, text, required): The Azure DevOps project, by name.
- Maximum results (`max_results`, number): Defaults to 100 if left blank. From 1 to 1000.

**Outputs**

- `count` (number)
- `items` (list)

**Example output**

```json
{
  "count": 1,
  "items": [
    {
      "folder": "\\",
      "id": "12",
      "name": "Fabrikam-Fiber CI",
      "revision": 3,
      "url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_build/definition?definitionId=12"
    }
  ]
}
```

### List projects

List the projects in the organization that the token can see.

**Inputs**

- State (`state`, text): Defaults to projects that are ready to use. One of: `wellFormed` (Ready to use), `all` (All, including those being created or deleted).
- Maximum results (`max_results`, number): Defaults to 100 if left blank. From 1 to 1000.
- Skip (`skip`, number): How many results to skip, to page past ones already fetched. At least 0.

**Outputs**

- `count` (number)
- `items` (list)

**Example output**

```json
{
  "count": 1,
  "items": [
    {
      "description": "Team project for the Fabrikam Fiber app",
      "id": "eb6e4656-77fc-42a1-9181-4c6d8e9da5d1",
      "last_update_time": "2026-09-01T10:00:00.000Z",
      "name": "Fabrikam-Fiber",
      "state": "wellFormed",
      "url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber",
      "visibility": "private"
    }
  ]
}
```

### List pull requests

List a repository's pull requests.

**Inputs**

- Project (`project`, text, required): The Azure DevOps project, by name.
- Repository (`repository`, text, required): Pick a repository after choosing the project, or type its name or id.
- Status (`status`, text): Defaults to active pull requests. One of: `active`, `completed`, `abandoned`, `all`.
- Source branch (`source_branch`, text): Only pull requests from this branch.
- Target branch (`target_branch`, text): Only pull requests into this branch.
- Maximum results (`max_results`, number): Defaults to 100 if left blank. From 1 to 1000.
- Skip (`skip`, number): How many results to skip, to page past ones already fetched. At least 0.

**Outputs**

- `count` (number)
- `items` (list)

**Example output**

```json
{
  "count": 1,
  "items": [
    {
      "closed_date": null,
      "created_by": "Jamal Hartnett",
      "created_by_email": "jamal@fabrikam.com",
      "creation_date": "2026-09-22T09:10:00Z",
      "description": "Adds a CSV export to the reports page.",
      "id": "22",
      "is_draft": false,
      "last_merge_source_commit": "b60280bc6e62e2f880f1b63c1e24987664d3bda3",
      "merge_status": "succeeded",
      "project": "Fabrikam-Fiber",
      "repository_id": "5febef5a-833d-4e14-b9c0-14cb638f91e6",
      "repository_name": "Fabrikam-Fiber",
      "reviewers": [
        {
          "display_name": "Normal Paulk",
          "id": "d6245f20-2af8-44f4-9451-8107cb2767db",
          "is_required": false,
          "unique_name": "normal@fabrikam.com",
          "vote": 0,
          "vote_label": "no vote"
        }
      ],
      "source_branch": "feature/export",
      "source_ref_name": "refs/heads/feature/export",
      "status": "active",
      "target_branch": "main",
      "target_ref_name": "refs/heads/main",
      "title": "Add CSV export",
      "url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_git/Fabrikam-Fiber/pullrequest/22",
      "work_item_ids": [
        "131"
      ]
    }
  ]
}
```

### List repositories

List a project's Git repositories with their default branches.

**Inputs**

- Project (`project`, text, required): The Azure DevOps project, by name.
- Name (`name`, text): Only the repository with exactly this name.

**Outputs**

- `count` (number)
- `items` (list)

**Example output**

```json
{
  "count": 1,
  "items": [
    {
      "default_branch": "main",
      "default_branch_ref": "refs/heads/main",
      "id": "5febef5a-833d-4e14-b9c0-14cb638f91e6",
      "is_disabled": false,
      "is_fork": false,
      "name": "Fabrikam-Fiber",
      "project": "Fabrikam-Fiber",
      "remote_url": "https://fabrikam@dev.azure.com/fabrikam/Fabrikam-Fiber/_git/Fabrikam-Fiber",
      "size": 204800,
      "ssh_url": "git@ssh.dev.azure.com:v3/fabrikam/Fabrikam-Fiber/Fabrikam-Fiber",
      "web_url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_git/Fabrikam-Fiber"
    }
  ]
}
```

### List work item types

List a project's work item types with their states and required fields. The types depend on the project's process.

**Inputs**

- Project (`project`, text, required): The Azure DevOps project, by name.

**Outputs**

- `count` (number)
- `items` (list)

**Example output**

```json
{
  "count": 1,
  "items": [
    {
      "color": "F2CB1D",
      "description": "Tracks work that needs to be done.",
      "name": "Task",
      "reference_name": "Microsoft.VSTS.WorkItemTypes.Task",
      "required_fields": [
        "System.Title"
      ],
      "states": [
        "New",
        "Active",
        "Closed",
        "Removed"
      ]
    }
  ]
}
```

### Query work items

Find work items with a WIQL query and return them with their fields. Flat queries only.

**Inputs**

- Project (`project`, text, required): The Azure DevOps project, by name.
- WIQL query (`wiql`, text, required): A Work Item Query Language query. In Azure DevOps, Boards → Queries → Edit WIQL shows the WIQL of any saved query.
- Maximum results (`max_results`, number): Defaults to 50 if left blank. From 1 to 200.

**Outputs**

- `count` (number)
- `items` (list)
- `total_matched` (number)

**Example output**

```json
{
  "count": 1,
  "items": [
    {
      "area_path": "Fabrikam-Fiber",
      "assigned_to": "Jamal Hartnett",
      "assigned_to_email": "jamal@fabrikam.com",
      "changed_date": "2026-09-22T09:00:00.000Z",
      "created_by": "Jamal Hartnett",
      "created_date": "2026-09-22T09:00:00.000Z",
      "description": "<div>Cover the new export feature.</div>",
      "fields": {
        "System.State": "New",
        "System.Title": "Update the release notes",
        "System.WorkItemType": "Task"
      },
      "id": "131",
      "iteration_path": "Fabrikam-Fiber\\Sprint 12",
      "priority": 2,
      "project": "Fabrikam-Fiber",
      "reason": "New",
      "rev": 1,
      "state": "New",
      "tags": [
        "docs"
      ],
      "title": "Update the release notes",
      "url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_workitems/edit/131",
      "work_item_type": "Task"
    }
  ],
  "total_matched": 1
}
```

### Run a pipeline

Start a pipeline run. It returns as soon as the run is queued; use 'Get a pipeline run' to follow it.

**Inputs**

- Project (`project`, text, required): The Azure DevOps project, by name.
- Pipeline (`pipeline_id`, text, required): Pick a pipeline after choosing the project, or type its id (the definitionId in the pipeline's address).
- Branch (`branch`, text): Defaults to the pipeline's default branch.
- Parameters (`template_parameters`, object): Values for the pipeline's runtime parameters.
- Variables (`variables`, object): Variable values. Each variable must be marked 'Let users override this value when running this pipeline'.

**Outputs**

- `created_date` (text)
- `finished_date` (text)
- `id` (text)
- `name` (text)
- `pipeline_id` (text)
- `pipeline_name` (text)
- `result` (text)
- `state` (text)
- `template_parameters` (object)
- `url` (text)

**Example output**

```json
{
  "created_date": "2026-09-22T09:20:00Z",
  "finished_date": null,
  "id": "345",
  "name": "20260922.1",
  "pipeline_id": "12",
  "pipeline_name": "Fabrikam-Fiber CI",
  "result": null,
  "state": "inProgress",
  "template_parameters": {},
  "url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_build/results?buildId=345"
}
```

### Update a pull request

Retitle a pull request, abandon or reactivate it, or complete (merge) it. Branch policies still apply to completing.

**Inputs**

- Project (`project`, text, required): The Azure DevOps project, by name.
- Repository (`repository`, text, required): Pick a repository after choosing the project, or type its name or id.
- Pull request ID (`pull_request_id`, text, required): The pull request's number, or its Azure DevOps link.
- Title (`title`, text): A new title.
- Description (`description`, text): A new description, up to 4,000 characters.
- Status (`status`, text): Leave blank to keep the current status. One of: `active` (Active (reactivate an abandoned pull request)), `abandoned` (Abandoned (close without merging)), `completed` (Completed (merge it)).
- Merge type (`merge_strategy`, text): How to merge when completing. One of: `noFastForward` (Merge (no fast-forward)), `squash` (Squash commit), `rebase` (Rebase and fast-forward), `rebaseMerge` (Semi-linear merge (rebase, then merge commit)).
- Delete source branch (`delete_source_branch`, true/false): Delete the source branch after completing.
- Merge commit message (`merge_commit_message`, text): The message for the merge commit when completing.
- Complete linked work items (`transition_work_items`, true/false): Move linked work items to their next state when completing.

**Outputs**

- `closed_date` (text)
- `created_by` (text)
- `created_by_email` (text)
- `creation_date` (text)
- `description` (text)
- `id` (text)
- `is_draft` (true/false)
- `last_merge_source_commit` (text)
- `merge_status` (text)
- `project` (text)
- `repository_id` (text)
- `repository_name` (text)
- `reviewers` (list)
- `source_branch` (text)
- `source_ref_name` (text)
- `status` (text)
- `target_branch` (text)
- `target_ref_name` (text)
- `title` (text)
- `url` (text)
- `work_item_ids` (list)

**Example output**

```json
{
  "closed_date": null,
  "created_by": "Jamal Hartnett",
  "created_by_email": "jamal@fabrikam.com",
  "creation_date": "2026-09-22T09:10:00Z",
  "description": "Adds a CSV export to the reports page.",
  "id": "22",
  "is_draft": false,
  "last_merge_source_commit": "b60280bc6e62e2f880f1b63c1e24987664d3bda3",
  "merge_status": "succeeded",
  "project": "Fabrikam-Fiber",
  "repository_id": "5febef5a-833d-4e14-b9c0-14cb638f91e6",
  "repository_name": "Fabrikam-Fiber",
  "reviewers": [
    {
      "display_name": "Normal Paulk",
      "id": "d6245f20-2af8-44f4-9451-8107cb2767db",
      "is_required": false,
      "unique_name": "normal@fabrikam.com",
      "vote": 0,
      "vote_label": "no vote"
    }
  ],
  "source_branch": "feature/export",
  "source_ref_name": "refs/heads/feature/export",
  "status": "abandoned",
  "target_branch": "main",
  "target_ref_name": "refs/heads/main",
  "title": "Add CSV export",
  "url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_git/Fabrikam-Fiber/pullrequest/22",
  "work_item_ids": [
    "131"
  ]
}
```

### Update a work item

Change a work item's fields. Only the fields you fill in are changed.

**Inputs**

- Project (`project`, text, required): The Azure DevOps project, by name.
- Work item ID (`work_item_id`, text, required): The work item's number, or its Azure DevOps link.
- Title (`title`, text): The work item's title.
- Description (`description`, text): The description. Basic HTML such as <b> and <ul> is kept.
- Assigned to (`assigned_to`, text): The person's email address as it appears in Azure DevOps.
- State (`state`, text): e.g. New, Active, Closed. Must be a state of this type and, on an update, a valid next step from the current one.
- Priority (`priority`, text): 1 is the highest. One of: `1` (1 (highest)), `2` (2 (high)), `3` (3 (medium)), `4` (4 (low)).
- Tags (`tags`, list): Tags to set. On an update this replaces the item's tags.
- Area path (`area_path`, text): e.g. MyProject\Web. Defaults to the project's root area.
- Iteration path (`iteration_path`, text): e.g. MyProject\Sprint 12. Defaults to the project's root.
- Other fields (`additional_fields`, object): Any other fields, keyed by reference name, e.g. {"Microsoft.VSTS.Scheduling.StoryPoints": 3}.

**Outputs**

- `area_path` (text)
- `assigned_to` (text)
- `assigned_to_email` (text)
- `changed_date` (text)
- `created_by` (text)
- `created_date` (text)
- `description` (text)
- `fields` (object)
- `id` (text)
- `iteration_path` (text)
- `priority` (number)
- `project` (text)
- `reason` (text)
- `rev` (number)
- `state` (text)
- `tags` (list)
- `title` (text)
- `url` (text)
- `work_item_type` (text)

**Example output**

```json
{
  "area_path": "Fabrikam-Fiber",
  "assigned_to": "Jamal Hartnett",
  "assigned_to_email": "jamal@fabrikam.com",
  "changed_date": "2026-09-22T09:00:00.000Z",
  "created_by": "Jamal Hartnett",
  "created_date": "2026-09-22T09:00:00.000Z",
  "description": "<div>Cover the new export feature.</div>",
  "fields": {
    "System.State": "New",
    "System.Title": "Update the release notes",
    "System.WorkItemType": "Task"
  },
  "id": "131",
  "iteration_path": "Fabrikam-Fiber\\Sprint 12",
  "priority": 2,
  "project": "Fabrikam-Fiber",
  "reason": "New",
  "rev": 2,
  "state": "Active",
  "tags": [
    "docs"
  ],
  "title": "Update the release notes",
  "url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_workitems/edit/131",
  "work_item_type": "Task"
}
```
