Restrict @claude mentions to steering-committee team members
Only users who are active members of the @steering-committee team can trigger Claude via @claude mentions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
a9e5cf7739
commit
604a3c9b13
1 changed files with 16 additions and 0 deletions
16
.github/workflows/claude.yml
vendored
16
.github/workflows/claude.yml
vendored
|
|
@ -25,6 +25,22 @@ jobs:
|
||||||
id-token: write
|
id-token: write
|
||||||
actions: read # Required for Claude to read CI results on PRs
|
actions: read # Required for Claude to read CI results on PRs
|
||||||
steps:
|
steps:
|
||||||
|
- name: Check team membership
|
||||||
|
run: |
|
||||||
|
# Check if user is member of steering-committee team
|
||||||
|
TEAM_SLUG="steering-committee"
|
||||||
|
RESPONSE=$(gh api "orgs/modelcontextprotocol/teams/${TEAM_SLUG}/memberships/${{ github.actor }}" 2>&1)
|
||||||
|
|
||||||
|
if echo "$RESPONSE" | grep -q '"state": "active"'; then
|
||||||
|
echo "✓ User is a member of $TEAM_SLUG team"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "✗ User is not a member of $TEAM_SLUG team or its subteams"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue