Skip to content

Commit cc8b18e

Browse files
docs: add comprehensive troubleshooting guidance for membership issues
Enhanced user experience for blocked users with detailed troubleshooting: Action improvements: - Clear step-by-step troubleshooting in action output - Enhanced GitHub annotations with direct links - Better error messages explaining membership requirements Workflow improvements: - Added comments explaining access requirements - Troubleshooting guidance in workflow logs - Clear instructions for making membership public README improvements: - Dedicated troubleshooting section - Step-by-step resolution guide - Common issues and solutions - Links to GitHub organization people page This addresses cases like blocked workflow runs by providing clear guidance on verifying and fixing organization membership visibility. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 3e496c7 commit cc8b18e

File tree

3 files changed

+64
-10
lines changed

3 files changed

+64
-10
lines changed

.github/actions/security/org-membership-check/README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,35 @@ The GitHub organization membership API works for both public and private members
4949

5050
This approach successfully detects all dotCMS organization members regardless of their membership visibility setting, using only the default GITHUB_TOKEN without requiring additional secrets or configuration.
5151

52+
## Troubleshooting
53+
54+
If you're a dotCMS team member but getting blocked by the security gate:
55+
56+
### Step 1: Verify Organization Membership
57+
1. Visit: https://github.com/orgs/dotCMS/people
58+
2. Look for your username in the member list
59+
3. If you're not listed, you need to be added to the organization
60+
61+
### Step 2: Check Membership Visibility
62+
If you are listed but still blocked:
63+
1. Look for a "Make public" button next to your name
64+
2. Click it to make your membership public
65+
3. This allows the workflow to detect your membership
66+
67+
### Step 3: Contact Organization Owners
68+
If you're not a member:
69+
- Contact a dotCMS organization owner to be added
70+
- Only organization members can trigger Claude workflows
71+
72+
### Common Issues
73+
- **Private membership**: Most common cause - make membership public
74+
- **Not a member**: Contact org owners to be added
75+
- **Recent changes**: GitHub API may take a few minutes to reflect visibility changes
76+
5277
## Security Considerations
5378

5479
- Only checks membership in the dotCMS organization (hardcoded)
55-
- Authorizes all organization members (both public and private)
80+
- Authorizes organization members (requires public membership visibility)
5681
- Logs authorization results without sensitive details
5782
- Uses default GITHUB_TOKEN (no additional secrets required)
58-
- No configuration or setup required for team members
83+
- Provides clear troubleshooting guidance for blocked users

.github/actions/security/org-membership-check/action.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,38 @@ runs:
4343
api_exit_code=$?
4444
4545
if [ $api_exit_code -eq 0 ]; then
46-
# HTTP 200/204: User is a member (public or private, but API accessible)
47-
# For public members: HTTP 204 No Content (empty response but success)
48-
# For private members: HTTP 204 No Content (empty response but success)
49-
# The key is that we get a successful HTTP response (not 404)
46+
# HTTP 204: User is a member (public or private)
5047
echo "✅ User ${{ inputs.username }} is a member of dotCMS"
5148
echo "is_member=true" >> $GITHUB_OUTPUT
5249
echo "membership_status=member" >> $GITHUB_OUTPUT
5350
else
54-
# HTTP 404: Not a member
55-
echo "❌ User ${{ inputs.username }} is not a member of dotCMS"
51+
# HTTP 404: Not a member OR private membership not visible to GITHUB_TOKEN
52+
echo "❌ User ${{ inputs.username }} is not authorized to trigger Claude workflows"
53+
echo ""
54+
echo "🔍 TROUBLESHOOTING STEPS:"
55+
echo "1. Verify you are a member of the dotCMS organization:"
56+
echo " → Visit: https://github.com/orgs/dotCMS/people"
57+
echo " → You should see your username in the list"
58+
echo ""
59+
echo "2. If you are a member but have PRIVATE visibility:"
60+
echo " → Click 'Make public' next to your name"
61+
echo " → This allows the workflow to detect your membership"
62+
echo ""
63+
echo "3. If you are not a member:"
64+
echo " → Contact a dotCMS organization owner to be added"
65+
echo " → Only dotCMS organization members can trigger Claude workflows"
66+
echo ""
5667
echo "is_member=false" >> $GITHUB_OUTPUT
5768
echo "membership_status=non-member" >> $GITHUB_OUTPUT
5869
fi
5970
6071
# Log the result for debugging (without leaking membership details)
6172
membership_result=$(if [ "$(cat $GITHUB_OUTPUT | grep 'is_member=true')" ]; then echo "AUTHORIZED"; else echo "UNAUTHORIZED"; fi)
62-
echo "::notice::Organization membership check result: $membership_result for ${{ inputs.username }}"
73+
74+
if [ "$membership_result" = "UNAUTHORIZED" ]; then
75+
echo "::notice::❌ BLOCKED: ${{ inputs.username }} failed organization membership check. If you're a dotCMS team member, visit https://github.com/orgs/dotCMS/people and ensure your membership is PUBLIC."
76+
else
77+
echo "::notice::✅ AUTHORIZED: ${{ inputs.username }} is a dotCMS organization member"
78+
fi
6379
env:
6480
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/issue_comment_claude-code-review.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ on:
2020

2121
jobs:
2222
# Security gate: Check if user is dotCMS organization member
23+
#
24+
# REQUIREMENTS FOR CLAUDE ACCESS:
25+
# 1. Must be a member of the dotCMS organization
26+
# 2. Membership must be set to PUBLIC visibility
27+
#
28+
# TROUBLESHOOTING: If blocked, visit https://github.com/orgs/dotCMS/people
29+
# and ensure your membership is public (click "Make public" if needed)
2330
security-check:
2431
runs-on: ubuntu-latest
2532
permissions:
@@ -43,7 +50,13 @@ jobs:
4350
if [ "${{ steps.membership-check.outputs.is_member }}" = "true" ]; then
4451
echo "✅ Access granted: User is a dotCMS organization member"
4552
else
46-
echo "❌ Access denied: User is not a dotCMS organization member"
53+
echo "❌ Access denied: User failed dotCMS organization membership check"
54+
echo ""
55+
echo "📋 TROUBLESHOOTING: If you are a dotCMS team member:"
56+
echo " 1. Visit https://github.com/orgs/dotCMS/people"
57+
echo " 2. Ensure your membership is set to 'Public'"
58+
echo " 3. If you're not listed, contact an organization owner"
59+
echo ""
4760
echo "::warning::Unauthorized user attempted to trigger Claude workflow: ${{ github.event.comment.user.login || github.actor }}"
4861
fi
4962

0 commit comments

Comments
 (0)