Send Stale GitHub PR Alerts
Scan open GitHub pull requests every 4 hours and send a ranked Slack alert for any PRs inactive for over 24 hours to clear engineering bottlenecks.
What It Does
Runs every 4 hours and checks all open pull requests across your GitHub repositories. Any PR with no activity (no commits, comments, or reviews) for more than 24 hours gets flagged. The team receives a Slack alert with a ranked list of stale PRs and direct links. When all PRs are active, it sends a single All Clear message instead to prevent notification fatigue.
How It Works
- Scheduled Trigger fires every 4 hours (using the cron schedule
0 */4 * * *). - GitHub Node lists all open pull requests across every repository the authenticated user has access to. It retrieves the title, author, repository name, created time, last updated time, and PR URL.
- AI Agent calculates how long each PR has been inactive. It separates stale PRs (24h+ without activity) from recently active ones and generates a Slack message in mrkdwn format featuring ranked action items and direct PR links.
- Slack Node posts the alert to your designated code review channel.
What You Get
- Slack alerts up to 6 times a day featuring a stale PR list and direct links.
- An "All Clear" message when nothing needs attention so the channel stays quiet.
- A ranked action list so the team knows exactly which PR to tackle first.
- The exact hours since the last activity displayed for each stale PR.
Who It Is For
- Engineering teams where PRs frequently sit unreviewed for days.
- Tech leads who want automated review hygiene without daily nagging.
- Remote and async teams where time zones create natural review gaps.
- Any team that consistently loses sprint points to review bottlenecks.
Setup
- Connect your GitHub account (requires repository read access).
- Connect your Slack account and select the channel to post PR alerts to.
- Publish the workflow to start running it automatically every 4 hours.
Customize It
| Configuration | Instructions |
|---|---|
| Stale Threshold | Change the threshold from 24h to 12h or 48h by editing the rules in the AI Agent prompt. |
| Repo Filters | Restrict alerts to specific repositories by adding an explicit filter instruction in the prompt. |
| Alert Frequency | Change the posting frequency from 4 hours to 8 hours by editing the cron schedule in the trigger node. |
Timezone Note
The trigger fires based on UTC time. The */4 pattern runs every 4 hours starting at midnight UTC. You can adjust the expression to 0 2,6,10,14,18,22 * * * to shift the windows so they align perfectly with your team's working hours.
Built By
Shamanth Kumar M Staff Technical Program Manager with 14+ years in engineering delivery. I build intelligent automation systems that replace manual work, from sprint tracking to DevOps pipelines to delivery health dashboards.
Want to showcase your own workflows?
Become a Needle workflow partner and turn your expertise into recurring revenue.
