Skip to content

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

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#159
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 had diverged completely from the canonical gate: it triggered only on pull_request_review: [submitted], inspected just the triggering review's author against a team-membership lookup that fell back to an empty list (warn-only, never blocking), and never ran on PR open/synchronize, so no gate status was ever set on new PRs. None of the components the fix patches existed in this variant, so the file is replaced with the canonical fixed version from .github#8:

  1. pull_request_target (opened/synchronize/reopened) plus pull_request_review: [submitted, dismissed] triggers, with the base-branch check at the job-level if.
  2. 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 via github.paginate.

This also replaces the unpinned actions/github-script@v9 with the canonical SHA pin.

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 c127aa3 into main Jun 11, 2026
1 check 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