Repository navigation
CLA nudge: never prompt Snowplow staff (org membership check) - #9
Merged
Merged
Conversation
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.
Why
The CLA nudge must never prompt Snowplow staff.
author_associationreports private org members asNONE, and a commit email is not a reliable staff signal, so both let staff through.What
Before commenting, the workflow checks whether the PR author belongs to Snowplow:
GET /repos/{repo}/collaborators/{author}. This covers members of the repo's own org through base read access, plus invited collaborators.snowplow,snowplow-incubator,snowplow-product,snowplow-devopsandsnowplow-referer-parser, it mints an installation token from the snowplow-cla-nudge GitHub App (Organization Members: read only) withactions/create-github-app-token, pinned to the v3.3.0 SHA, and callsGET /orgs/{org}/members/{author}. App tokens can see private memberships.It stays silent unless it's certain. It comments only when every lookup confirms the author is not a member. A missing token, a missing install or an API error means no comment. Token steps use
continue-on-error, so the required check never fails.The commit email check is removed.
Requires
snowplow-cla-nudgeapp installed on all 5 orgs.CLA_NUDGE_APP_IDandCLA_NUDGE_APP_PRIVATE_KEY(visibility: all) in each org.Until both exist, the workflow stays silent. It never prompts by mistake.