Use org membership app for external contribution labels - #22673
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Remove the internal repository reference from the public PR description before approval.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: None
What changed in this PR
Uses a dedicated read-only GitHub App token to identify external contributors safely.
Changes:
- Mints an organization-membership token.
- Labels only authors confirmed as non-members.
- Fails safely on membership API errors.
| File | Description |
|---|---|
.github/workflows/label-external-contributions.yml |
Adds membership-token creation and status-aware labeling. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
sam-robson
marked this pull request as draft
September 24, 2026 09:10
sam-robson
force-pushed
the
sam-robson/use-org-membership-labeler-app
branch
2 times, most recently
from
September 24, 2026 09:20
52e4730 to
fa34ffc
Compare
sam-robson
force-pushed
the
sam-robson/use-org-membership-labeler-app
branch
from
September 24, 2026 09:32
fa34ffc to
385947c
Compare
sam-robson
marked this pull request as ready for review
September 24, 2026 09:38
andersfugmann
approved these changes
Sep 25, 2026
andersfugmann
left a comment
Contributor
There was a problem hiding this comment.
LGTM.
Thanks a lot for doing this
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
codeql-org-membership-readerGitHub AppGITHUB_TOKENfor repository reads and label writes204), label confirmed non-members (404), and fail closed on every other responseThe workflow remains manually disabled and should be re-enabled only after this change merges.
Testing
actionlint -color .github/workflows/label-external-contributions.yml204for an organization member404for a non-member