ci: exempt private org members from PR contribution check#4580
Conversation
author_association only reports MEMBER for *public* org members, so this workflow's GITHUB_TOKEN saw private members (Arda, Ashraf, and others) as CONTRIBUTOR and would have auto-closed their PRs. Add an explicit allowlist of internal handles alongside the association check so private-member teammates are exempt too.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe PR enhances the contribution-check workflow's internal contributor detection. A new lowercase allowlist of internal GitHub logins is introduced and combined with ChangesInternal Contributor Detection
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Follow-up to #4579. While testing that bot in dry-run against real PRs, it flagged a PR by
ashrafchowdury(a core team member) as external and would have closed it.Root cause:
author_associationonly reportsMEMBERfor public org members. Arda, Ashraf, and other teammates have private org membership, which this workflow'sGITHUB_TOKENcannot see, so it receivedCONTRIBUTORand treated them as external.Fix: add an explicit allowlist of internal GitHub handles, checked alongside
author_association. Public members stay auto-covered by the association; private-member teammates are covered by the allowlist. A comment explains why the list exists and when to add to it.The workflow is currently disabled on
main(I disabled it after finding this). Re-enable it once this merges.Testing
Verified locally
git diff origin/mainshows only the allowlist delta.force_external=falseto confirm the exemption now skips it.Added or updated tests
N/A. CI workflow.
QA follow-up
After merge: re-enable the workflow, then dispatch
13 - check PR contribution(dry_run=true) against a member's PR to confirminternal, skipping, and against an external non-compliant PR to confirm it still flags.Demo
N/A. Touches only
.github/**.Checklist