Skip to content

CI: prune CODEOWNERS avalanche on non-draft PR open#6474

Merged
brtnfld merged 2 commits into
HDFGroup:developfrom
brtnfld:fix/review-checklist-opened-prune
Jun 19, 2026
Merged

CI: prune CODEOWNERS avalanche on non-draft PR open#6474
brtnfld merged 2 commits into
HDFGroup:developfrom
brtnfld:fix/review-checklist-opened-prune

Conversation

@brtnfld

@brtnfld brtnfld commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • When a non-draft PR opens, GitHub immediately auto-assigns every CODEOWNERS owner for all touched areas.
  • The previous additive-only logic saw every area as already covered and returned the full auto-assigned set as `confirmedRequested`, so the checklist @-mentioned all owners before the final reviewer set was known (e.g. PR CI: base draft PR staleness on real activity, not pr.updated_at #6472 got all four `.github` owners pinged).
  • On `opened`/`reopened` (non-draft), now mirrors the draft behavior: passes an empty `existingRequested` to `chooseReviewers` to get a fresh load-balanced pick, then calls `removeUnselected` to prune everyone GitHub auto-assigned who isn't in that pick. The checklist is posted with only the selected reviewer(s).
  • Also folds in the bot-sender guard (previously PR CI: guard reviewer-exclusion update against bot-triggered removals #6473, now closed): the `removeUnselected` calls fire `review_request_removed` events that self-trigger new workflow runs. Without the guard, those runs would record the bot's own removals as deliberate human decisions and permanently add the pruned logins to the exclusion set, blocking them from ever being auto-assigned to the PR again.

GitHub auto-assigns every touched-area CODEOWNER when a non-draft PR
opens. The previous additive-only logic saw all areas already covered
and returned the full auto-assigned set as confirmedRequested, so the
checklist @-mentioned every owner before the final reviewer set was
known.

On opened/reopened (non-draft), now behave like the draft case: prune
to a single load-balanced pick per area via removeUnselected before
posting the checklist, requesting any pick not already on the PR.
The bot's own CODEOWNERS cleanup and draft-handling calls fire
review_request_removed events that self-trigger another workflow run.
Without this guard, that run would interpret the bot's own removal as a
deliberate human decision and permanently add the login to the exclusion
set, blocking that owner from ever being auto-assigned to the PR again.
@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Review Checklist

This PR touches the following areas. Each needs a sign-off
from its listed owners before merging.

✅ All areas have been signed off.

@brtnfld brtnfld merged commit 2265cf5 into HDFGroup:develop Jun 19, 2026
134 of 136 checks passed
@github-project-automation github-project-automation Bot moved this from To be triaged to Done in HDF5 - TRIAGE & TRACK Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants