Daily GitHub PR Triage
Fetch open GitHub pull requests each weekday morning, use AI to flag blocked and stale PRs, and post a formatted triage report to your Slack channel.
Daily GitHub PR Triage
This workflow helps your development team start each weekday with a clear snapshot of the current state of pull requests in your GitHub repository. Every weekday morning, it gathers open PRs, analyzes their status using AI, and sends a concise triage report directly to your Slack channel.
What It Does
- Triggers on schedule β Fires every weekday at 8:30 AM UTC.
- Fetches open PRs β Pulls the most recently updated open pull requests from your specified GitHub repository.
- Analyzes with AI β An AI agent acting as a Senior Engineering Manager identifies blocked, stale, and active PRs and writes a one-sentence summary for each.
- Posts to Slack β Delivers a formatted triage report to your team's Slack channel.
What You Need
- A GitHub account with access to the repository you want to monitor.
- A configured GitHub connector in Needle with appropriate permissions.
- An AI model available in Needle.
- A Slack workspace with a bot invited to the channel where you want the report posted.
- The Slack channel ID for that channel.
How the Flow Works
| Step | Node | Description |
|---|---|---|
| 1 | Scheduled Trigger | Fires automatically at 8:30 AM UTC, Monday through Friday. |
| 2 | GitHub: List Open PRs | Fetches up to 20 open pull requests sorted by most recently updated from your chosen repository. Change the owner and repo fields to point to your own project. |
| 3 | AI Engineering Manager | Sends the PR data to an AI model acting as a Senior Engineering Manager. It flags PRs as blocked (unresolved comments, failing checks), stale (no updates for 48+ hours), or active, and creates a one-sentence summary for each. The output is formatted in Slack markdown. |
| 4 | Slack Delivery | Posts the triage report to the specified Slack channel with clear formatting and emoji status indicators. |
Output
At the end of each run, you'll get a Slack message in your chosen channel that looks like this:
- π΄ Blocked PRs β unresolved comments, failing checks, or conflicts.
- π‘ Stale PRs β no activity for more than 48 hours.
- β Active PRs β healthy and in progress.
Each PR entry includes its number, author, title in bold, and a short summary. This helps your team quickly identify what needs attention before the day begins.
Customization Tips
- Change the repository β Update the
ownerandrepovalues in the GitHub node to monitor your own project. - Adjust the schedule β Change the trigger time and timezone to fit your team's standup schedule. Running the flow a bit earlier is helpful if your team meets before 9 AM local time.
- Invite your Slack bot β Make sure the bot has been invited to the target channel (type
/invite @YourBotNamein the channel), or the message won't appear. - Edit the AI prompt β Change the tone, add extra checks, or adjust the criteria for what counts as blocked or stale.
- Increase PR count β If your team has many open PRs, raise the
perPagevalue in the GitHub node to capture more results.
Want to showcase your own workflows?
Become a Needle workflow partner and turn your expertise into recurring revenue.
