mirror of
https://github.com/xtr-dev/payload-billing.git
synced 2025-12-10 02:43:24 +00:00
fix: restrict Claude workflows to only bvdaakster user
- Change issue implementation workflow to only allow bvdaakster - Update code review workflow to only trigger for bvdaakster's PRs - Update configuration to reflect single-user access - Remove other privileged users from the list Only bvdaakster can now: - Trigger Claude issue implementations with @claude comments - Have PRs automatically reviewed by Claude 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
9
.github/claude-config.json
vendored
9
.github/claude-config.json
vendored
@@ -1,16 +1,15 @@
|
|||||||
{
|
{
|
||||||
"privilegedUsers": [
|
"privilegedUsers": [
|
||||||
"bastiaan",
|
"bvdaakster"
|
||||||
"xtr-dev-team"
|
|
||||||
],
|
],
|
||||||
"permissions": {
|
"permissions": {
|
||||||
"issueImplementation": {
|
"issueImplementation": {
|
||||||
"strategy": "adminOrPrivileged",
|
"strategy": "privilegedUsers",
|
||||||
"description": "Allow admins and privileged users to request Claude implementations"
|
"description": "Only bvdaakster can request Claude implementations"
|
||||||
},
|
},
|
||||||
"codeReview": {
|
"codeReview": {
|
||||||
"strategy": "privilegedUsers",
|
"strategy": "privilegedUsers",
|
||||||
"description": "Only run Claude reviews for privileged users"
|
"description": "Only bvdaakster can trigger Claude reviews"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"strategies": {
|
"strategies": {
|
||||||
|
|||||||
7
.github/workflows/claude-code-review.yml
vendored
7
.github/workflows/claude-code-review.yml
vendored
@@ -12,11 +12,8 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
claude-review:
|
claude-review:
|
||||||
# Permission filter: Only allow specific users or admins to trigger reviews
|
# Permission filter: Only allow bvdaakster to trigger reviews
|
||||||
if: |
|
if: github.event.pull_request.user.login == 'bvdaakster'
|
||||||
contains(fromJSON('["bastiaan", "xtr-dev-team"]'), github.event.pull_request.user.login) ||
|
|
||||||
github.event.pull_request.author_association == 'OWNER' ||
|
|
||||||
github.event.pull_request.author_association == 'MEMBER'
|
|
||||||
|
|
||||||
# Alternative filters (comment out the above and use one of these):
|
# Alternative filters (comment out the above and use one of these):
|
||||||
# Only for external contributors:
|
# Only for external contributors:
|
||||||
|
|||||||
6
.github/workflows/claude-implement-issue.yml
vendored
6
.github/workflows/claude-implement-issue.yml
vendored
@@ -30,9 +30,7 @@ jobs:
|
|||||||
|
|
||||||
// Method 1: Specific privileged users list
|
// Method 1: Specific privileged users list
|
||||||
const privilegedUsers = [
|
const privilegedUsers = [
|
||||||
'bastiaan', // Repository owner
|
'bvdaakster' // Only this user can use Claude
|
||||||
'xtr-dev-team', // Core team members
|
|
||||||
// Add more usernames here
|
|
||||||
];
|
];
|
||||||
|
|
||||||
// Method 2: Check repository permission level
|
// Method 2: Check repository permission level
|
||||||
@@ -74,7 +72,7 @@ jobs:
|
|||||||
const allowedByOrgAndWrite = isOrgMember && hasWriteAccess;
|
const allowedByOrgAndWrite = isOrgMember && hasWriteAccess;
|
||||||
|
|
||||||
// Set your chosen strategy here:
|
// Set your chosen strategy here:
|
||||||
const isAllowed = allowedByAdminOrPrivileged; // Change this line to use your preferred strategy
|
const isAllowed = isPrivilegedUser; // Only bvdaakster can use Claude
|
||||||
|
|
||||||
if (!isAllowed) {
|
if (!isAllowed) {
|
||||||
const errorMessage = `❌ **Access Denied**: Claude implementation is restricted to privileged users only.
|
const errorMessage = `❌ **Access Denied**: Claude implementation is restricted to privileged users only.
|
||||||
|
|||||||
Reference in New Issue
Block a user