From b6851c5738d1b4e3b3a8c16d061319132956be2a Mon Sep 17 00:00:00 2001 From: Olufunke Moronfolu Date: Thu, 23 Jul 2026 10:45:18 +0200 Subject: [PATCH 1/4] Add comment to settings.json for overriding instructions --- .claude/settings.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.claude/settings.json b/.claude/settings.json index 53603db57d7..2fe66bcbc6a 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -1,4 +1,5 @@ { + "_comment": "DO NOT EDIT THIS FILE. To override these settings, use .claude/settings.local.json instead.", "env": { "CLAUDE_CODE_ENABLE_TELEMETRY": "0", "DISABLE_TELEMETRY": "1", From e7403e4709a2adc563e4099800b3f78d23e9751d Mon Sep 17 00:00:00 2001 From: Olufunke Moronfolu Date: Thu, 23 Jul 2026 11:00:07 +0200 Subject: [PATCH 2/4] Refactor PR assignment logic to use team membership check for Technical Writers --- .github/workflows/auto-assign-pr.yml | 28 ++++++++++----------- .github/workflows/check-claude-settings.yml | 23 ++++++++++++++++- 2 files changed, 35 insertions(+), 16 deletions(-) diff --git a/.github/workflows/auto-assign-pr.yml b/.github/workflows/auto-assign-pr.yml index 5957bf8ebd3..91419195772 100644 --- a/.github/workflows/auto-assign-pr.yml +++ b/.github/workflows/auto-assign-pr.yml @@ -19,20 +19,6 @@ jobs: const prNumber = context.payload.pull_request.number; const assignees = context.payload.pull_request.assignees; - // Technical Writers team members - const techWriters = [ - 'ConnorLand', - 'Karuna-Mendix', - 'MariaShaposhnikova', - 'MarkvanMents', - 'NicoletaComan', - 'OlufunkeMoronfolu', - 'Yiyun333', - 'dbreseman', - 'katarzyna-koltun-mx', - 'quinntracy' - ]; - console.log(`Processing PR #${prNumber} by ${creator}`); console.log(`Current assignees: ${assignees.length > 0 ? assignees.map(a => a.login).join(', ') : 'none'}`); @@ -41,7 +27,19 @@ jobs: return; } - if (techWriters.includes(creator)) { + let isTechWriter = false; + try { + const { data: membership } = await github.rest.teams.getMembershipForUserInOrg({ + org: 'mendix', + team_slug: 'technical-writers', + username: creator + }); + isTechWriter = membership.state === 'active'; + } catch { + isTechWriter = false; + } + + if (isTechWriter) { console.log(`${creator} is on technical writers team, assigning PR...`); await github.rest.issues.addAssignees({ owner: context.repo.owner, diff --git a/.github/workflows/check-claude-settings.yml b/.github/workflows/check-claude-settings.yml index 04c65c9c0fa..6f576dab176 100644 --- a/.github/workflows/check-claude-settings.yml +++ b/.github/workflows/check-claude-settings.yml @@ -9,11 +9,32 @@ on: 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 author = context.payload.pull_request.user.login; + + let isTechWriter = false; + try { + const { data: membership } = await github.rest.teams.getMembershipForUserInOrg({ + org: 'mendix', + team_slug: 'technical-writers', + username: author + }); + isTechWriter = membership.state === 'active'; + } catch { + isTechWriter = false; + } + + if (isTechWriter) { + 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.** @@ -34,7 +55,7 @@ jobs: \`\`\` `; - github.rest.issues.createComment({ + await github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, From 7905b260ac2c5c67b90f7f6be2e3eb4ae50239e9 Mon Sep 17 00:00:00 2001 From: Olufunke Moronfolu Date: Thu, 23 Jul 2026 11:17:13 +0200 Subject: [PATCH 3/4] assign PR and check Claude settings workflows to use a predefined list of Technical Writers --- .github/workflows/auto-assign-pr.yml | 27 +++++++++++---------- .github/workflows/check-claude-settings.yml | 27 +++++++++++---------- 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/.github/workflows/auto-assign-pr.yml b/.github/workflows/auto-assign-pr.yml index 91419195772..9c6873c08be 100644 --- a/.github/workflows/auto-assign-pr.yml +++ b/.github/workflows/auto-assign-pr.yml @@ -15,6 +15,19 @@ jobs: uses: actions/github-script@v9 with: script: | + const techWriters = [ + 'ConnorLand', + 'Karuna-Mendix', + 'MariaShaposhnikova', + 'MarkvanMents', + 'NicoletaComan', + 'OlufunkeMoronfolu', + 'Yiyun333', + 'dbreseman', + 'katarzyna-koltun-mx', + 'quinntracy' + ]; + const creator = context.payload.pull_request.user.login; const prNumber = context.payload.pull_request.number; const assignees = context.payload.pull_request.assignees; @@ -27,19 +40,7 @@ jobs: return; } - let isTechWriter = false; - try { - const { data: membership } = await github.rest.teams.getMembershipForUserInOrg({ - org: 'mendix', - team_slug: 'technical-writers', - username: creator - }); - isTechWriter = membership.state === 'active'; - } catch { - isTechWriter = false; - } - - if (isTechWriter) { + if (techWriters.includes(creator)) { console.log(`${creator} is on technical writers team, assigning PR...`); await github.rest.issues.addAssignees({ owner: context.repo.owner, diff --git a/.github/workflows/check-claude-settings.yml b/.github/workflows/check-claude-settings.yml index 6f576dab176..bad6ad7e196 100644 --- a/.github/workflows/check-claude-settings.yml +++ b/.github/workflows/check-claude-settings.yml @@ -16,21 +16,22 @@ jobs: uses: actions/github-script@v9 with: script: | - const author = context.payload.pull_request.user.login; + const techWriters = [ + 'ConnorLand', + 'Karuna-Mendix', + 'MariaShaposhnikova', + 'MarkvanMents', + 'NicoletaComan', + 'OlufunkeMoronfolu', + 'Yiyun333', + 'dbreseman', + 'katarzyna-koltun-mx', + 'quinntracy' + ]; - let isTechWriter = false; - try { - const { data: membership } = await github.rest.teams.getMembershipForUserInOrg({ - org: 'mendix', - team_slug: 'technical-writers', - username: author - }); - isTechWriter = membership.state === 'active'; - } catch { - isTechWriter = false; - } + const author = context.payload.pull_request.user.login; - if (isTechWriter) { + if (techWriters.includes(author)) { console.log(`${author} is a Technical Writer — Claude configuration change approved.`); return; } From fa55f7ca8defbbf258e30dbdadf621524de5586d Mon Sep 17 00:00:00 2001 From: Olufunke Moronfolu Date: Thu, 23 Jul 2026 11:20:08 +0200 Subject: [PATCH 4/4] revert auto-assign PR script --- .github/workflows/auto-assign-pr.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/auto-assign-pr.yml b/.github/workflows/auto-assign-pr.yml index 9c6873c08be..609833753cc 100644 --- a/.github/workflows/auto-assign-pr.yml +++ b/.github/workflows/auto-assign-pr.yml @@ -15,6 +15,11 @@ jobs: uses: actions/github-script@v9 with: script: | + const creator = context.payload.pull_request.user.login; + const prNumber = context.payload.pull_request.number; + const assignees = context.payload.pull_request.assignees; + + // Technical Writers team members const techWriters = [ 'ConnorLand', 'Karuna-Mendix', @@ -28,10 +33,6 @@ jobs: 'quinntracy' ]; - const creator = context.payload.pull_request.user.login; - const prNumber = context.payload.pull_request.number; - const assignees = context.payload.pull_request.assignees; - console.log(`Processing PR #${prNumber} by ${creator}`); console.log(`Current assignees: ${assignees.length > 0 ? assignees.map(a => a.login).join(', ') : 'none'}`); @@ -52,3 +53,4 @@ jobs: } else { console.log(`${creator} is not on technical writers team, skipping assignment`); } + \ No newline at end of file