Before
DevOps team members likely had to review open pull requests one by one, compare their last update dates with the aging threshold, and determine who should be notified. They also had to look up user identities in a separate mapping database and manually route alerts when a matching Slack identity was unavailable.
How it works
- Retrieve open pull requests from the configured repository and review each request for activity older than the defined threshold.
- Look up the pull request author and search the identity mapping database for a matching Slack recipient.
- Post a detailed Slack alert to the mapped user, or notify the repository administrator when no mapping is found.
Workflow details
- Collect pull requests: The workflow retrieves up to 100 open pull requests from the configured repository and evaluates them individually.
- Check for stale activity: Each pull request is compared against the configured age threshold, with the workflow focusing on requests that have not been changed for approximately 30 days.
- Identify the recipient: For every stale pull request, the workflow retrieves the associated GitHub user and searches a Notion mapping database for the corresponding Slack identity.
- Send the appropriate alert: When a user mapping is available, the workflow posts a Slack notification containing the pull request link, title, and last update date. If no mapping is found, it sends the same warning to the repository administrator instead.
- Support codebase hygiene: The resulting alerts give the responsible team a clear prompt to review outdated pull requests and decide whether they should be updated, closed, or otherwise addressed.
What changed
Stale pull requests are identified during the workflow run and automatically turned into Slack notifications containing the relevant link, title, and update date. Recipient lookup and fallback routing now happen automatically, while the responsible team still decides how to address each outdated request.
Work removed
Reviewing pull requests one by one for stale updates, checking each author’s identity, searching the user-to-Slack mapping database, composing alert messages, and manually routing notifications for unmapped users.
Expected outcome
As a conservative planning estimate, each qualifying pull request can eliminate one manual age review and one manual notification handoff, while a single run can evaluate up to 100 open pull requests.
