forked from mendix/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (54 loc) · 2.27 KB
/
Copy pathcheck-claude-settings.yml
File metadata and controls
66 lines (54 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Check Claude Configuration
on:
pull_request:
paths:
- '.claude/**'
- 'CLAUDE.md'
jobs:
check-claude-config:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Check for Claude configuration changes
uses: actions/github-script@v9
with:
script: |
const techWriters = [
'ConnorLand',
'Karuna-Mendix',
'MariaShaposhnikova',
'MarkvanMents',
'NicoletaComan',
'OlufunkeMoronfolu',
'Yiyun333',
'dbreseman',
'katarzyna-koltun-mx',
'quinntracy'
];
const author = context.payload.pull_request.user.login;
if (techWriters.includes(author)) {
console.log(`${author} is a Technical Writer — Claude configuration change approved.`);
return;
}
const comment = `⚠️ **Claude Configuration Warning**
You've modified Claude Code configuration files. These files contain the shared configuration for all contributors. Please revert this change if unintended. **ONLY modify these files if you need to change shared configurations that apply to everyone and have discussed this change with the TW team.**
To override the Claude settings locally, use \`.claude/settings.local.json\` instead. This local file is gitignored and overrides the repo default.
**For example, if you're changing AWS_PROFILE:**
The default profile name is \`my-sandbox\`. If your AWS profile has a different name, override it locally instead of changing the shared file.
Create or edit \`.claude/settings.local.json\` in the repo root and include the following lines:
\`\`\`json
{
"env": {
"AWS_PROFILE": "your-sandbox-name"
}
}
\`\`\`
`;
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
});
core.setFailed('Claude configuration was modified - see comment for guidance');