Repository navigation
55 lines (45 loc) · 2.04 KB
/
Copy pathcheck-claude-settings.yml
File metadata and controls
55 lines (45 loc) · 2.04 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
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 have 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.
See [\`.claude/settings.local.json.example\`](https://github.com/mendix/docs/blob/development/.claude/settings.local.json.example) for available options you can override (AWS profile, region, Bedrock configuration, and model selection).
`;
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');