ci: add concurrency group to pr-review-trigger to prevent duplicate reviews#13890
ci: add concurrency group to pr-review-trigger to prevent duplicate reviews#13890derekmisler wants to merge 1 commit into
Conversation
docker-agent
left a comment
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
The concurrency group and bot-skip condition added in this PR are correct.
Concurrency group (line 15): Uses github.event.pull_request.number as the key. Both pull_request and pull_request_review_comment events include a pull_request object in their payload (unlike issue_comment), so the group key is always well-formed and will correctly deduplicate simultaneous events for the same PR without collapsing across unrelated PRs.
Bot-sender skip (line 21): github.event.sender.type != 'Bot' uses the correct capitalization ('Bot'), which matches GitHub's documented sender type values. Combined with the fork-repo guard (github.event.pull_request.head.repo.fork), the condition correctly gates execution to fork PRs from non-bot actors.
No bugs introduced by this PR were found.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…eviews Signed-off-by: Derek Misler <derek.misler@docker.com>
a278523 to
a30b245
Compare
docker-agent
left a comment
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
The PR correctly adds a concurrency group to deduplicate simultaneous pull_request events for fork PRs, and gates the job on fork == true plus a bot-sender check. No high- or medium-severity bugs were introduced.
Minor observations (not blocking):
- The concurrency key
pr-review-trigger-${{ github.event.pull_request.number }}would collapse topr-review-trigger-if the PR number were ever absent (e.g., if theon:block were later extended to non-pull_requestevents). Consider including${{ github.event_name }}in the key for robustness. - The
github.event.pull_request.head.repo.forkboolean check silently skips same-repo PRs — this is intentional but may benefit from a comment in the YAML for future maintainers.
There was a problem hiding this comment.
Pull request overview
This PR updates the GitHub Actions trigger workflow used to kick off PR reviews, reducing duplicate downstream review runs caused by multiple near-simultaneous pull_request events on the same PR, and avoiding unnecessary executions for bot-originated events.
Changes:
- Added a workflow-level
concurrencygroup keyed by PR number to deduplicate concurrent runs. - Added an early job
if:guard to run only for fork PRs and to skip bot senders.
Adds a concurrency group keyed by PR number to
pr-review-trigger.ymlto preventtriplicate reviews when simultaneous
pull_requestevents fire for the same fork PR(e.g., multiple
review_requestedevents when several reviewers are added at once).Also skips Bot-type senders (Dependabot, Renovate) early to save Actions minutes.