You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: use fine-grained token for organization membership checking
Switch from GITHUB_TOKEN to fine-grained token with membership read permissions:
- Resolves private membership visibility issues
- Uses MACHINE_USER_CORE_ORG_MEMBERSHIP_CHECK fine-grained token
- Enables checking both public and private organization members
- Updates action to accept github_token input parameter
- Updates workflow to pass fine-grained token secret to action
- Updates documentation with fine-grained token requirements
This should now correctly authorize sfreudenthaler and other private members.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
@@ -37,7 +39,12 @@ This composite action checks if a GitHub user is a member of the dotCMS organiza
37
39
38
40
## Implementation Details
39
41
40
-
The action uses the GitHub CLI (`gh`) with the repository's `GITHUB_TOKEN` to check organization membership via the GitHub API endpoint `GET /orgs/dotCMS/members/{username}`.
42
+
The action uses the GitHub CLI (`gh`) with a fine-grained GitHub token to check organization membership via the GitHub API endpoint `GET /orgs/dotCMS/members/{username}`.
43
+
44
+
**Token Requirements:**
45
+
- Fine-grained token with organization membership read permissions
46
+
- Should be from a machine/service account for security
47
+
- Stored as repository secret: `MACHINE_USER_CORE_ORG_MEMBERSHIP_CHECK`
41
48
42
49
**Key Design Decision: Status Code vs Response Body**
43
50
@@ -57,4 +64,5 @@ This approach correctly authorizes all organization members (including owners wi
57
64
- Only checks membership in the dotCMS organization (hardcoded)
58
65
- Does not expose whether membership is public or private
59
66
- Logs authorization results without sensitive details
60
-
- Uses repository's built-in `GITHUB_TOKEN` for API access
0 commit comments