docs

Azure DevOps

Receive Azure DevOps work item and pull request comment events in Plural

An Azure DevOps webhook delivers work items and pull request comments from Azure DevOps into Plural through a Web Hooks service hook subscription. Each work item or comment becomes an issue record in Plural that a workbench can act on. Azure DevOps authenticates each delivery with HTTP Basic authentication, using the Plural secret as the password.

An event does not start a job by itself. A job starts only when a webhook trigger on a workbench matches the item, and only when the item has just become open: a new open work item or comment, or a work item that moved back into a state Plural treats as open. Edits to an item that is already open do not start another job, and the same item starts at most one job per workbench in an hour.

What Plural reads from the payload

Plural looks at the service hook envelope's eventType and resource:

  • Work item events. Any eventType that starts with workitem., such as workitem.created, workitem.updated, workitem.commented, workitem.deleted, or workitem.restored, is read as the work item in resource.
  • Pull request comment events. The Pull request commented on event (ms.vss-code.git-pullrequest-comment-event) is read as a separate item for each comment.

Every other event is acknowledged and ignored. That includes code pushes and the pull request created, updated, and merged events, whose resource is the pull request itself.

Event
Title
Body
Link
Work itemSystem.TitleThe work item fields described belowresource._links.html.href, or resource.url when there is no HTML link
Pull request commentComment on PR: <pull request title> (#<comment id>)Comment textThe comment's HTML link, or the pull request URL

A work item's body is built from its fields under Markdown headings: Description (System.Description), then Repro steps, Acceptance criteria, System info, Found in build, and Resolved reason when those fields are present. Values are stored as Azure DevOps sends them, which is often HTML. Bodies longer than 10,000 characters are truncated.

Plural identifies a work item by its project ID (resourceContainers.project.id) and resource.id, so later events for the same work item update the existing record instead of creating a new one.

A trigger matches against the title and body joined by a newline. Because a comment's title includes the pull request title, a trigger that matches text in a pull request title also matches every comment on that pull request.