Daily stale pull request nudge in Slack DMs

By General Input

Every weekday at 10am, find stale GitHub PRs across your repos and DM the right person on Slack with the PRs they're blocking.

Integrations

  • GitHub
  • Slack

Type

Agentic Task

Categories

  • Engineering
  • Operations

Build me an agent workflow that nudges people about stale pull requests every weekday at 10am.

Trigger: cron, every weekday (Mon-Fri) at 10:00am in my local timezone.

What the agent should do on each run:

1. Use GitHub Search Issues and Pull Requests with a query like is:pr is:open updated:<3-days-ago, scoped to my repos or org. Return up to ~50 candidate PRs sorted by oldest update first.

2. For each candidate PR, call GitHub List Pull Request Reviews to see who has reviewed it and what state their last review was in. Use that to decide who is on the hook:

- If the most recent review on the PR is a CHANGES_REQUESTED, the PR author is on the hook. Put it in the "author needs to respond" bucket.

- If there are no reviews yet, or the last review state is COMMENTED with no approval and no change request, the requested reviewers are on the hook. Put it in the "waiting on reviewer" bucket. If a PR has multiple requested reviewers, ping each of them.

- Skip draft PRs and PRs labeled wip or do-not-merge.

3. Group results by person (GitHub login). Each person should end up with a small list of PRs they're blocking, with a one-line note for each: title, repo, age ("updated 5 days ago"), and the PR URL.

4. Map each GitHub user to a Slack user. Try matching on primary email first, then display name. If you can't resolve someone, skip them and include them in a final summary so I know who fell through.

5. For every resolved person, draft a short, friendly Slack DM (not a corporate-sounding one) that:

- Opens with one sentence of context ("Quick PR nudge").

- Lists their PRs as bullets with the title, repo, age, and link.

- Tailors the verb to the bucket: reviewers get "could you take a look", authors get "this is waiting on changes from you".

- Stays under ~6 lines total.

6. Send each DM via Slack: call Open a Conversation with the target user's Slack ID to get a DM channel, then call Send a Message with the drafted text. Don't @-mention them inside the DM.

7. At the end, log a short run summary (how many PRs scanned, how many people pinged, anyone you couldn't resolve) so I can spot-check it.

Constraints: don't ping the same person more than once per run even if they own multiple PRs (consolidate into a single DM). Don't post in any public channels by default. If GitHub Search returns zero stale PRs, exit without sending anything.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentWin back LiveChat visitors whose chats went unansweredChat quality review board for LiveChat support leadsWin back no-show and cancelled appointments every morningLive Loop returns analytics with product-level drill-downNewsletter pre-flight and approval board for Mailjet sendsTurn a prospect spreadsheet into personalized sequence enrollmentsMailjet email delivery lookup console for support teamsCatch feature flags that never got switched on in productionKajabi customer support console for member access fixes