Nudge stalled Azure DevOps pull requests every weekday

By General Input

Every weekday morning we check your open pull requests, work out who is actually blocking each one, and send that person a direct message in Slack.

Integrations

  • Azure DevOps
  • Slack Bot

Type

Agentic Task

Categories

  • Engineering

Every weekday at 9:30am, sweep all open pull requests across my Azure DevOps repositories and nudge the one person who owns the next action on each stalled pull request. Use a cron trigger so this works without depending on service hook configuration.

Start with List Repositories to enumerate the Git repositories in my project, then use List Pull Requests on each repository filtered to active pull requests. For every pull request that survives the filters below, call Get Pull Request for the full detail, including reviewer vote state and timestamps, and List PR Threads to read the comment threads.

Skip draft pull requests, anything opened in the last 24 hours, and any pull request where every assigned reviewer has already voted approved. Treat a pull request as stalled when there has been no new commit, comment, or reviewer vote for at least 2 days. Make that idle threshold a value I can easily change, and measure idle time from the most recent activity of any kind rather than from the creation date.

For each stalled pull request, work out who actually owns the next action. Read the reviewer votes (approved, approved with suggestions, waiting for the author, rejected, or no vote at all) together with the unresolved comment threads. If unresolved threads contain reviewer questions or change requests the author has not answered or addressed, the ball is with the author. If the author has replied to every open thread or pushed new commits since the last review, or if no reviewer has voted at all, the ball is with the reviewer who is silent or who last requested changes. Choose exactly one responsible person per pull request, and note the specific reason so the message can be concrete.

Resolve that person from their Azure DevOps identity to their Slack account with Look Up User by Email, using the email address on their Azure DevOps profile, then use Send a Message to send them a direct message. Each message should name the pull request with its title and link, say how many days it has been idle, and state the single specific next action they owe, for example that three reviewer comments about error handling are still unresolved on their pull request, or that they were added as a reviewer six days ago and have not voted yet. Keep it to a couple of sentences, stay friendly rather than accusatory, and send at most one direct message per person per pull request per run. If no Slack account matches that email address, skip the direct message and still include the pull request in the team summary.

Finish by using Send a Message to post one ranked summary to my engineering channel, ordered with the most blocking and longest idle pull requests first. For each entry show the repository, the pull request title and link, how many days it has been idle, who is blocking it, and the next action they owe. Add a one line total of how many pull requests are stalled so the team sees the whole review queue in one place at standup. If nothing is stalled, post a short all clear instead of staying silent.

Related prompts

Explore more prompts
A brand asset library your marketing team actually searchesTurn Mailjet email clicks into ranked HubSpot follow-upsClean out the Looker dashboards and Looks nobody opensLiveKit live operations console for room moderationWake up dormant Keap leads with a researched reasonLiveChat coverage board for planning next week's shiftsPhone routing control panel for LiveKit voice agentsLinkedIn Ads budget pacing dashboard for every client accountGive your team Looker numbers without buying more seatsPause marketing emails to escalated customers, then restore them