Repository navigation
ci: post the daily CI approval reminder to Slack with AI triage labels - #4645
Merged
Merged
Conversation
Rewrite the PR workflow approval reminder: - Find waiting runs by the `action_required` conclusion. The old check looked for the `waiting` status, which these runs never have, so it found no PR. - Match runs to open PRs by the current head commit, because runs from forks have no `pull_requests` entry. Read all pages of open PRs and runs. - Group the PRs by their AI triage label (ai:ci-safe, ai:ci-needs-care, not triaged) and show the other ai:* labels, the author, and the waiting time. - Post to Slack with Block Kit through the PR_REMINDER_SLACK_WEBHOOK secret. PR titles are escaped and never reach a shell. - Run every day at 06:00 Europe/Zurich, only in the upstream repository. Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
Contributor
|
✅ DCO Check Passed Thanks @dolfim-ibm, all your commits are properly signed off. 🎉 |
Contributor
Merge Protections🟢 Merge protection satisfied — ready to merge. Show 1 satisfied protection🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
PeterStaar-IBM
self-requested a review
October 7, 2026 13:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rewrites the
PR Workflow Approval Reminderworkflow. Every morning, it posts to Slack the open PRs whose CI waits for a maintainer to approve it.Why a rewrite
The current workflow has three problems:
waitingstatus. Runs that wait for approval have the conclusionaction_requiredinstead, so it never finds a PR.${{ }}. This allows shell injection.What it does now
Finding waiting runs: it finds
pull_requestruns with the conclusionaction_required. It matches them to open PRs by the current head commit, because runs from forks have an emptypull_requestslist. A run for an older commit of a PR does not count. Draft PRs are skipped.Message: it groups the PRs by their AI triage label (see ci: add advisory AI triage for pull requests before CI approval #4639):
ai:ci-safeai:ci-needs-careEach PR shows a link, the author, how long the CI has waited, and the other
ai:*labels, for exampleai:possible-duplicate. The oldest PRs come first, and the list shows at most 40.Posting: it posts a Block Kit message to Slack through the
PR_REMINDER_SLACK_WEBHOOKsecret. PR titles are escaped, so they cannot form links or mentions, and they never reach a shell. When no PR waits, it posts nothing.Schedule: every day at 06:00 in the
Europe/Zurichtime zone. Thetimezonekey ofschedulehandles daylight saving time. Onlydocling-project/doclingruns it, not forks. Aworkflow_dispatchrun withdry_runprints the message in the log instead of posting it.This replaces the Discord webhook. The
PR_REMINDER_DISCORD_WEBHOOKsecret is not used anymore.Setup needed before merge
PR_REMINDER_SLACK_WEBHOOK. Without the secret, the job prints the message and shows a warning.Checklist:
Review evidence:
uv run pytest tests/test_pr_approval_reminder.py: 3 passed. The tests cover matching by head commit, drafts, old commits, grouping, escaping, and splitting long lists.make validate: passed.--dry-run) againstdocling-project/doclingfound 14 open PRs that wait for CI approval. The oldest waits 22 days. All 14 are in "Not triaged", because the AI triage is not merged yet.