You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`PR body is missing the '## Agent attestation' section. ` +
46
+
`Coding-agent PRs must include the attestation block from PULL_REQUEST_TEMPLATE.md.`
47
+
);
48
+
return;
49
+
}
50
+
51
+
const lines = sectionMatch[1].split(/\r?\n/);
34
52
const unchecked = [];
35
53
for (let i = 0; i < lines.length; i++) {
36
54
const m = lines[i].match(/^\s*[-*]\s+\[\s\]\s+(.*)$/);
37
55
if (m) {
38
-
unchecked.push(`L${i + 1}: ${m[1]}`);
56
+
unchecked.push(m[1]);
39
57
}
40
58
}
41
59
42
60
if (unchecked.length > 0) {
43
61
core.setFailed(
44
-
`PR body has ${unchecked.length} unticked checkbox(es). ` +
45
-
`The 'coding-agent' label requires every checkbox to be ticked before merge.\n\n` +
62
+
`Agent attestation has ${unchecked.length} unticked checkbox(es). ` +
63
+
`Coding-agent PRs require every attestation box to be ticked before merge.\n\n` +
46
64
unchecked.map(u => ` - ${u}`).join('\n') +
47
-
`\n\nTick each box in the PR description, or remove the 'coding-agent' label if this PR was not produced by the agent.`
65
+
`\n\nTick each box in the '## Agent attestation' section. If this PR was not produced by an agent, remove the 'coding-agent' label (the gate also fires automatically for the Copilot bot author).`
48
66
);
49
67
return;
50
68
}
51
69
52
-
core.info('All checkboxes in the PR body are ticked. Gate passes.');
70
+
core.info('All Agent attestation checkboxes are ticked. Gate passes.');
0 commit comments