Skip to content

Commit 560f346

Browse files
committed
test(ci): align issue workflow permission assertion
1 parent 2bf0062 commit 560f346

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎tests/ci-workflows.test.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4141,8 +4141,11 @@ 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 issue automation now authenticates the pinned Copilot inference
4145+
// action with copilot-requests:write; models:read was the retired provider
4146+
// permission from the pre-Copilot workflow.
41444147
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/,
4148+
/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/,
41464149
);
41474150
const translateJob = workflow.split(/\n {2}translate:\n/)[1]!.split(/\n {2}[a-zA-Z]/)[0]!;
41484151
expect(translateJob).not.toMatch(/actions:\s*write/);

0 commit comments

Comments
 (0)