[DT-4048] fix triage notifications not triggering, switch to inline notification#3472
Open
ardiewen wants to merge 3 commits into
Open
[DT-4048] fix triage notifications not triggering, switch to inline notification#3472ardiewen wants to merge 3 commits into
ardiewen wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Description & motivation 💭
Followup to DT-4048: the original Slack notification design used a separate workflow (
a11y-bucket-notify.yml) triggered bypull_request: labeled. That design was structurally broken because GitHub explicitly does not fire downstream workflows from events triggered byGITHUB_TOKEN(recursion-prevention). The triage workflow applied bucket labels viaactions/github-script(which usesGITHUB_TOKEN), so the resultinglabeledevents were delivered but the notification workflow never ran.This PR collapses the two-workflow design into one. The triage workflow now fires the Slack
chat.postMessagedirectly viafetchwhen itstoAddlabel diff includesa11y:bucket-3ora11y:bucket-4. The marker-based dedup behavior is preserved (still uses a hidden bot comment to track the last-pinged bucket and skip on re-runs).a11y-bucket-notify.ymlis deleted.Sibling PR: cloud-ui#2690.
Screenshots (if applicable) 📸
N/A — pure CI / tooling change. No UI surfaces.
Design Considerations 🎨
CONTRIBUTOR. During smoke testing we discovered thatGITHUB_TOKEN-scoped API lookups returnCONTRIBUTORfor org members with private membership (since the repo-scope token can't see the private org membership). For OSS UI, aCONTRIBUTORis still a vetted prior-merge author, not a drive-by — pairing that with the title gate + manifest lookup is sufficient gating. External drop-in PRs would haveauthor_association = NONEorFIRST_TIMER, which we still filter.${{ vars.DESIGN_FEEDBACK_SLACK_CHANNEL }}repo variable.slackapi/slack-github-actionstep; the outputs didn't propagate reliably inactions/github-script@v7. Doing the Slack call inline in github-script (via the globalfetch) is the most robust path.newlyAddedBucket = undefinedand skips the Slack path entirely. The dedup marker handles the trailer-edit-cycle case (remove then re-add the trailer → same bucket → single ping).Testing 🧪
How was this tested 👻
cloud-ui(workflow logic is identical between the two repos modulo the channel string).Smoke test details: opened a draft PR titled
a11y(1.4.12): smoke v4 debugin cloud-ui withA11y-Audit-Ref: 1.4.12-cloud-breadcrumb-overflow. Workflow run 26640915135 emittedSlack ping sent (a11y:bucket-3) to #team-feuxand the message landed in#team-feux. Smoke PR closed; main test artifacts (labels, marker comment) are visible on cloud-ui#2700.Steps for others to test 🚶🏽♂️🚶🏽♀️
After merge, the workflow will fire Slack inline on the next
pull_requestevent (orworkflow_dispatch) that newly transitions a PR into Bucket-3 or Bucket-4. Verify by checking the workflow run on the next a11y PR that gets a Bucket-3+ label.Checklists
Draft Checklist
(none)
Merge Checklist
(none)
Issue(s) closed
Followup to DT-4048.
Docs
Any docs updates needed?
None. Slack notification semantics are unchanged from the user's perspective; the workflow architecture change is internal.