@@ -25,43 +25,10 @@ jobs:
2525 id-token : write
2626 actions : read
2727 steps :
28- # Only allow modelcontextprotocol org members to trigger @claude
29- # This enables @claude to work on external fork PRs when triggered by org members
30- # Members list is fetched from modelcontextprotocol/access repo
31- - name : Check if org member
32- run : |
33- ACTOR="${{ github.triggering_actor }}"
34- USERS_URL="https://raw.githubusercontent.com/modelcontextprotocol/access/main/src/config/users.ts"
35-
36- # Fetch users.ts and extract GitHub usernames
37- MEMBERS=$(curl -fsSL "$USERS_URL" | grep -oE 'github:\s*"[^"]+"' | sed 's/github:\s*"//;s/"$//')
38-
39- if echo "$MEMBERS" | grep -qxF "$ACTOR"; then
40- echo "User $ACTOR is a member of modelcontextprotocol org"
41- else
42- echo "::error::User $ACTOR is not a member of the modelcontextprotocol org. Only org members can trigger @claude."
43- exit 1
44- fi
45-
46- # For PR comments, get PR details to checkout the correct branch (including forks)
47- - name : Get PR details
48- id : pr
49- if : github.event.issue.pull_request
50- env :
51- GH_TOKEN : ${{ github.token }}
52- run : |
53- PR_DATA=$(gh api ${{ github.event.issue.pull_request.url }})
54- echo "number=$(echo "$PR_DATA" | jq -r '.number')" >> $GITHUB_OUTPUT
55- echo "head_ref=$(echo "$PR_DATA" | jq -r '.head.ref')" >> $GITHUB_OUTPUT
56- echo "head_repo=$(echo "$PR_DATA" | jq -r '.head.repo.full_name')" >> $GITHUB_OUTPUT
57- echo "is_fork=$(echo "$PR_DATA" | jq -r '.head.repo.fork')" >> $GITHUB_OUTPUT
58-
5928 - name : Checkout repository
6029 uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
6130 with :
6231 fetch-depth : 1
63- # For fork PRs, checkout via PR ref; otherwise use the branch directly
64- ref : ${{ steps.pr.outputs.is_fork == 'true' && format('refs/pull/{0}/head', steps.pr.outputs.number) || steps.pr.outputs.head_ref || github.ref }}
6532
6633 - name : Run Claude Code
6734 id : claude
0 commit comments