Skip to content

fix(workflows): re-evaluate maintainer gate on reviews, require head-SHA approval#288

Merged
imran-siddique merged 1 commit into
mainfrom
fix/maintainer-gate-review-trigger
Jun 11, 2026
Merged

fix(workflows): re-evaluate maintainer gate on reviews, require head-SHA approval#288
imran-siddique merged 1 commit into
mainfrom
fix/maintainer-gate-review-trigger

Conversation

@imran-siddique

Copy link
Copy Markdown
Contributor

Summary

Ports the maintainer-gate fix from agentrust-io/.github#8 into this repo's copy of require-maintainer-approval.yml. Refs agentrust-io/.github#9.

This repo's copy is an older variant of the gate (job gate, in-script author-association skip, github-script v7 pin), so the fix was ported into that structure rather than overwriting with the canonical file:

  1. Added pull_request_review: [submitted, dismissed] trigger so an approval re-evaluates the gate without waiting for a push. pull_request_review does not support a branches filter, so the base-branch check moved to a job-level if (github.event.pull_request.base.ref == 'main').
  2. Approve-then-swap fix: only a maintainer's most recent non-comment review counts, and it must be APPROVED with commit_id equal to the PR head SHA fetched at evaluation time.
  3. listReviews now uses github.paginate (the unpaginated call caps at 30 reviews).

Kept as-is from this repo's variant: workflow/job naming, statuses: write permission, github-script v7.0.1 pin, in-script MEMBER/OWNER skip.

Validated with yaml.safe_load.

Note: This PR is itself blocked by the broken gate it fixes. Approve then re-run the gate workflow manually, or admin-merge.

Generated with Claude Code

…SHA approval

Ports agentrust-io/.github#8. Refs agentrust-io/.github#9.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@imran-siddique imran-siddique merged commit b930008 into main Jun 11, 2026
3 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant