Repository navigation
ci(adr): attribute Slack notifications to the merger - #7944
Conversation
Signed-off-by: Adam Scerra <ascerra@redhat.com>
PR Summary by QodoAttribute ADR Slack notifications to the PR merger
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1. Slack workflow lacks CI guide sign-off
|
|
🤖 Finished Review · ✅ Success · Started 9:28 PM UTC · Completed 9:38 PM UTC Commit: Runtime: pi · Model: openai/gpt-6.1-sol → gpt-6.1-sol · Effort: high · Cost: $1.62 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Risk Assessment: moderate (2/5) DetailsSmall six-line change touching a protected CI workflow file with low recent churn, warranting a moderate risk score. |
ReviewFindingsHigh
Labels: The PR corrects attribution in a GitHub Actions notification workflow. Next steps:
|
waynesun09
left a comment
There was a problem hiding this comment.
Approving the protected-path change.
merged_by is the right source here. The job runs only when merged == true, and for queue merges in this repo merged_by is the human who enqueued (checked on #7827, #7840, #7843 and #7863), so "Merged by" now names that person instead of the author. The value still reaches the script only through env: and jq --arg, so nothing new can be injected, and no references to PR_AUTHOR/$author remain.
Optional, not blocking: merged_by is nullable in the webhook schema. If it were ever null, the message would read "Merged by **". A fallback (merged_by.login || user.login) would cover that.
The ADR Slack notifier displays the PR author under “Merged by”, incorrectly attributing merges. For example, PR #7827 was authored by
dhshah13and merged bywaynesun09, but the notification nameddhshah13as the merger.Use
github.event.pull_request.merged_by.loginand rename the corresponding environment variable and jq argument so the message identifies the actual merge actor.Validation: staged-file pre-commit checks passed, including actionlint, YAML validation, pinact, and secret scanning. A local payload check using PR #7827's author/merger verified “Merged by waynesun09”; shell syntax and
git diff --checkalso passed.makeis unavailable locally, so its underlyingpre-commit runwas invoked directly.