Auto-summarize new pull requests in Microsoft Teams

By General Input

When a pull request opens in Azure DevOps, an agent writes a plain-English summary and posts it to Teams so reviewers instantly know what to prioritize.

Integrations

  • Azure DevOps
  • Microsoft Teams

Type

Agentic Task

Categories

  • Engineering

This workflow runs every time a new pull request is opened in Azure DevOps. Use the Azure DevOps "Pull request created" service hook (the git.pullrequest.created event) as the trigger so the workflow fires the moment a PR is created.

When the webhook fires, take the pull request id, repository id, and project from the event payload and call Get Pull Request to load the full details: the title, the description, the source and target branches, the requested reviewers, the web URL that links back to the PR, and the last merge source commit.

Then call Get Commit on that source commit with the change list included so you can see exactly which files were added, edited, or deleted in this pull request. Use the file paths to understand which parts of the codebase the change touches.

Read the pull request title, description, and the list of changed files, then write a plain-English summary aimed at a reviewer who has not opened the code yet. Cover three things: what the pull request does in one or two sentences; which areas of the codebase it touches, grouping the changed files by folder or component so it is easy to scan; and anything worth a careful look, such as large diffs, changes to shared or sensitive files, database migrations, config, or dependency updates. Keep it concise and skimmable. The goal is to help reviewers prioritize, not to replace reading the diff.

Post the summary as a Microsoft Teams channel message using Create Channel Message in the code review channel. Start with the pull request title and its author, clearly name each requested reviewer so they know the review is waiting on them, include the plain-English summary and the grouped list of touched areas, flag anything risky, and end with a link back to the pull request in Azure DevOps so anyone can jump straight to it.

If the pull request has no requested reviewers yet, still post the summary and note that no reviewers are assigned so someone can pick it up. Format the message to be scannable at a glance: a short heading, a few bullets for the touched areas, and clear call-outs for anything that needs a careful look.

Related prompts

Explore more prompts
Screen chartered vessels for AIS gaps and sanctions red flagsRun your weekly bug triage meeting on one Azure DevOps boardCross-project delivery health dashboard for Azure DevOpsSupport bug intake and status portal for Azure DevOpsNudge stalled Azure DevOps pull requests every weekdayCatch phishing domains impersonating your brand each morningDaily SonarCloud quality gate status board in TeamsClose won in Dynamics 365 and invoice when a contract is signedWeekday Teams reminders for your Blackboard grading backlogWeekday Azure DevOps sprint standup digest in Slack