fix(ci): split vouch gate into two steps with separate tokens#446
Merged
johntmyers merged 1 commit intomainfrom Mar 18, 2026
Merged
fix(ci): split vouch gate into two steps with separate tokens#446johntmyers merged 1 commit intomainfrom
johntmyers merged 1 commit intomainfrom
Conversation
The ORG_READ_TOKEN (read:org PAT) was being used for all API calls, including closing PRs and posting comments, which it lacks permissions for. Split into two steps: 1. Org membership check — uses ORG_READ_TOKEN exclusively 2. VOUCHED.td check + close — uses default GITHUB_TOKEN (has repo write) Step 2 is skipped entirely if step 1 confirms org membership.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ORG_READ_TOKENfor the entiregithub-scriptstep, but that token only hasread:orgscope — it can't close PRs, post comments, or read repo content. NVIDIA's enterprise policy also rejected the classic PAT due to lifetime > 366 days.Related Issue
Follow-up to #442, #444, #445. Fixes #430 / #431.
Changes
.github/workflows/vouch-check.yml:org-check): UsesORG_READ_TOKENexclusively fororgs.checkMembershipForUser. Returns'skip'if the author is an org member.GITHUB_TOKEN(hascontents: read+pull-requests: write). Only runs if step 1 didn't return'skip'. Handles bot check, VOUCHED.td lookup, and closing unvouched PRs.Action Required
The current
ORG_READ_TOKENwas rejected by NVIDIA's enterprise policy:Regenerate the PAT at https://github.com/settings/tokens/3788283427 with expiry ≤ 366 days, or create a new fine-grained PAT.
Checklist