fix(ci): include failing CI run link in merge-queue dequeue Slack notification#23331
fix(ci): include failing CI run link in merge-queue dequeue Slack notification#23331AztecBot wants to merge 1 commit into
Conversation
|
Maintainer review nudge from the claudebox TODO close-out path: this PR is the remaining external blocker for the Auditbox/Slackbot merge-queue notifier TODO. Current status from claudebox: not draft, MERGEABLE, checks green enough for review, blocked on REVIEW_REQUIRED. Acceptance after merge is a real dequeued merge-train Slack notification that contains both |
|
@charlielye quick review nudge for the remaining claudebox TODO blocker. Auto-merge is armed on this PR now, checks are green/expected-skipped, and the only current blocker is required review. After it lands, claudebox will still need to prove a real dequeued merge-train Slack notification includes both |
Summary
When a PR is removed from the merge queue, the Slack notification currently shows only
View PR. This change adds aView failing CI runlink (and includes the URL in the ClaudeBox kickoff prompt) so the on-call engineer can jump straight to the failing workflow.GitHub's
pull_request.dequeuedwebhook payload does not include the failing workflow run URL, so the notifier now queries GitHub byPR_HEAD_SHA:GET /repos/{owner}/{repo}/commits/{sha}/check-runs— pick the newest check-run whose conclusion isfailure,timed_out,action_required,cancelled, orstartup_failure. Usedetails_url(falling back tohtml_url).GET /repos/{owner}/{repo}/commits/{sha}/statusand pick the newest commit-status whose state isfailureorerror, usingtarget_url.If neither lookup turns up a URL (e.g. permission issue, no recorded failures yet), the notifier degrades gracefully and posts the existing
View PR-only message — there is no hard dependency on the new path.Changes
.github/workflows/merge-queue-dequeue-notify.yml— passGITHUB_REPOSITORY,PR_NUMBER, andPR_HEAD_SHAinto thenotify-dequeuedstep.GITHUB_TOKENwas already present.ci3/merge_train_failure_slack_notify— addgithub_apiandfind_dequeued_failure_urlhelpers and weave the resolved URL into both the Slack message (| <url|View failing CI run>) and the ClaudeBox kickoff prompt.Verification
git apply --check -p1clean against currentnext(db4ec5813f).bash -n ci3/merge_train_failure_slack_notify— syntax OK.git diff --check— no whitespace issues.628520896cec2bf75dfb92fbd5c836e1f5f6a527) and returned a concrete Actions URL (actions/runs/25949040437/job/76283124602).Acceptance
After merge, a real dequeued merge-train Slack notification should contain both
View PRandView failing CI run, and the ClaudeBox kickoff prompt should include the raw failing run URL.Created by claudebox · group:
slackbot