Quick Overview
This workflow runs every weekday at 9 AM, checks open pull requests across configured GitHub repositories, calculates how long each PR has been waiting on review activity, and posts a ranked review-lag digest to a chosen Slack channel.
How it works
- Runs on a weekday schedule at 9:00 AM and loads the repository list, staleness threshold, draft filtering option, and target Slack channel.
- Queries the GitHub API for open pull requests in each configured repository.
- Filters out draft PRs (optional), normalizes PR fields, and fetches each PR’s review history from the GitHub API.
- Calculates review-lag metrics per PR (age, last review time, current review status, and whether it is stale based on the configured days threshold).
- Aggregates and ranks PRs by review lag, then builds a Slack-formatted digest grouped by PR author.
- Posts the digest to Slack only when there are PRs to report.
Setup
- Add GitHub credentials for the HTTP Request nodes (a Personal Access Token in an HTTP Header Auth credential with access to the target repositories).
- Add a Slack OAuth2 connection and ensure the workflow can post to the target channel.
- Update the configuration values (repositories, stale_days, slack_channel, and exclude_drafts) to match your GitHub org and Slack workspace.
- Confirm the schedule trigger cron expression (0 9 * * 1-5) matches your intended timezone and weekdays.