Skip to content

Commit 39f452a

Browse files
committed
test(ci): the Copilot migration swapped models:read for copilot-requests:write
Pre-existing red on origin/dev (run 31078958589 and a clean dev worktree both fail it); the permissions gate now matches the migrated workflow.
1 parent 4d22be4 commit 39f452a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎tests/ci-workflows.test.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4141,8 +4141,10 @@ describe("GitHub Actions hardening", () => {
41414141
expect(commentApply).toContain("omitted required field(s)");
41424142

41434143
// Job-scoped permissions only (no top-level issues:write; no actions:write).
4144+
// The Copilot migration replaced `models: read` with `copilot-requests: write`
4145+
// as the inference credential; the job stays contents-read + issues-write.
41444146
expect(workflow).toMatch(
4145-
/jobs:\s*\n\s*translate:[\s\S]*?permissions:\s*\n(?:\s*#.*\n)*\s*contents: read\s*\n(?:\s*#.*\n)*\s*issues: write\s*\n(?:\s*#.*\n)*\s*models: read/,
4147+
/jobs:\s*\n\s*translate:[\s\S]*?permissions:\s*\n(?:\s*#.*\n)*\s*contents: read\s*\n(?:\s*#.*\n)*\s*issues: write\s*\n(?:\s*#.*\n)*\s*copilot-requests: write/,
41464148
);
41474149
const translateJob = workflow.split(/\n {2}translate:\n/)[1]!.split(/\n {2}[a-zA-Z]/)[0]!;
41484150
expect(translateJob).not.toMatch(/actions:\s*write/);

0 commit comments

Comments
 (0)