Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/scripts/agents_verifier_context.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,31 @@ async function buildVerifierContext({ github, context, core }) {
const contextPath = path.join(process.cwd(), 'verifier-context.md');
fs.writeFileSync(contextPath, markdown, 'utf8');

// Skip verifier if there are no acceptance criteria to verify
if (acceptanceCount === 0) {
const skipReason = 'No acceptance criteria found in PR or linked issues; skipping verifier.';
core?.notice?.(skipReason);
core?.setOutput?.('should_run', 'false');
core?.setOutput?.('skip_reason', skipReason);
core?.setOutput?.('pr_number', String(pull.number || ''));
core?.setOutput?.('issue_numbers', JSON.stringify(issueNumbers));
core?.setOutput?.('pr_html_url', pull.html_url || '');
core?.setOutput?.('target_sha', targetSha);
core?.setOutput?.('context_path', contextPath);
core?.setOutput?.('acceptance_count', '0');
core?.setOutput?.('ci_results', JSON.stringify(ciResults));
return {
shouldRun: false,
reason: skipReason,
markdown,
contextPath,
issueNumbers,
targetSha,
acceptanceCount,
ciResults,
};
}
Comment on lines +283 to +306
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new skip logic for when acceptanceCount is 0 lacks test coverage. The test file .github/scripts/tests/agents-verifier-context.test.js should include a test case that verifies the verifier is skipped when no acceptance criteria are found in the PR or linked issues. This is important since it's a new behavioral change affecting when the verifier runs.

Copilot uses AI. Check for mistakes.

core?.setOutput?.('should_run', 'true');
core?.setOutput?.('skip_reason', '');
core?.setOutput?.('pr_number', String(pull.number || ''));
Expand Down
Loading