Skip to content

Commit 1232257

Browse files
Add comment to settings.json for overriding instructions (#11597)
* Add comment to settings.json for overriding instructions * Refactor PR assignment logic to use team membership check for Technical Writers * assign PR and check Claude settings workflows to use a predefined list of Technical Writers
1 parent 95a305f commit 1232257

3 files changed

Lines changed: 25 additions & 1 deletion

File tree

.claude/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"_comment": "DO NOT EDIT THIS FILE. To override these settings, use .claude/settings.local.json instead.",
23
"env": {
34
"CLAUDE_CODE_ENABLE_TELEMETRY": "0",
45
"DISABLE_TELEMETRY": "1",

.github/workflows/auto-assign-pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,4 @@ jobs:
5353
} else {
5454
console.log(`${creator} is not on technical writers team, skipping assignment`);
5555
}
56+

.github/workflows/check-claude-settings.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,33 @@ on:
99
jobs:
1010
check-claude-config:
1111
runs-on: ubuntu-latest
12+
permissions:
13+
pull-requests: write
1214
steps:
1315
- name: Check for Claude configuration changes
1416
uses: actions/github-script@v9
1517
with:
1618
script: |
19+
const techWriters = [
20+
'ConnorLand',
21+
'Karuna-Mendix',
22+
'MariaShaposhnikova',
23+
'MarkvanMents',
24+
'NicoletaComan',
25+
'OlufunkeMoronfolu',
26+
'Yiyun333',
27+
'dbreseman',
28+
'katarzyna-koltun-mx',
29+
'quinntracy'
30+
];
31+
32+
const author = context.payload.pull_request.user.login;
33+
34+
if (techWriters.includes(author)) {
35+
console.log(`${author} is a Technical Writer — Claude configuration change approved.`);
36+
return;
37+
}
38+
1739
const comment = `⚠️ **Claude Configuration Warning**
1840
1941
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.**
@@ -34,7 +56,7 @@ jobs:
3456
\`\`\`
3557
`;
3658
37-
github.rest.issues.createComment({
59+
await github.rest.issues.createComment({
3860
issue_number: context.issue.number,
3961
owner: context.repo.owner,
4062
repo: context.repo.repo,

0 commit comments

Comments
 (0)