Skip to content

feat: scheduled PR review digest to Slack#21

Merged
Ilia merged 2 commits into
mainfrom
feat/pr-review-digest
Jun 1, 2026
Merged

feat: scheduled PR review digest to Slack#21
Ilia merged 2 commits into
mainfrom
feat/pr-review-digest

Conversation

@Ilia
Copy link
Copy Markdown
Contributor

@Ilia Ilia commented Jun 1, 2026

Summary

Adds a scheduled GitHub Actions workflow that posts a digest of PRs awaiting a reviewer across the `pactflow` org to Slack twice daily.

Rules

A PR is included in the digest if all of the following are true:

  • Open and not a draft
  • Authored by a human (bots excluded via `__typename == "User"` — catches renovate-bot, dependabot, github-actions, etc.)
  • No reviewer has been assigned (`reviewRequests.totalCount == 0`)
  • All CI checks are passing (`status:success`)
  • Does not carry the `DO NOT MERGE` label

Schedule

  • 8:30am AEST Mon–Fri (`30 22 * * 0-4` UTC)
  • 2:30pm AEST Mon–Fri (`30 4 * * 1-5` UTC)

Silent if no PRs qualify — no noise on clean days.

Secrets required

Secret Notes
`SMARTBEAR_SLACK_WEBHOOK_URL` Already exists as org secret
`PACTFLOW_CI_BOT_APP_ID` Already exists as org secret
`PACTFLOW_CI_BOT_PRIVATE_KEY` Already exists as org secret

A short-lived GitHub App token is generated at runtime via `actions/create-github-app-token@v1` — no long-lived PAT required.

Test plan

  • Merge this PR
  • Trigger manually: Actions → PR Review Digest → Run workflow
  • Confirm Slack message appears with correct PRs listed
  • Confirm silent run when no PRs qualify

🤖 Generated with Claude Code

Posts a digest of unreviewed open PRs across the pactflow org to Slack
twice daily (8:30am and 2:30pm AEST), with weekend-aware staleness filtering.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@JP-Ellis JP-Ellis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the one change (there's a standard GitHub action to create a short-lived token)

Comment thread .github/workflows/pr-review-digest.yml Outdated
- Replace two gh search prs REST calls with a single GraphQL query
- Use __typename == "User" for reliable bot detection (catches renovate-bot,
  dependabot, github-actions without fragile login pattern matching)
- Filter reviewRequests.totalCount == 0 to exclude PRs already assigned a reviewer
- Remove age cutoff — surface all qualifying PRs regardless of age
- Replace GH_PAT with short-lived GitHub App token (actions/create-github-app-token)

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@Ilia Ilia requested a review from JP-Ellis June 1, 2026 22:43
@Ilia Ilia merged commit a5c71ff into main Jun 1, 2026
2 checks passed
@Ilia Ilia deleted the feat/pr-review-digest branch June 1, 2026 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants