Skip to content
Merged
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
9 changes: 7 additions & 2 deletions .github/workflows/maint-71-merge-sync-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,13 @@ jobs:
process.env.DISPATCH_SYNC_HASH,
].map((value) => String(value || '').trim()).find(Boolean) || '';
const selector = raw.startsWith(prefix) ? raw.slice(prefix.length) : raw;
if (selector && !['candidate', 'campaign'].includes(selector)) {
throw new Error('active sync selector must be candidate or campaign');
const namedSelectors = new Set(['candidate', 'campaign', 'delivery', 'dev-tool']);
const legacyHash = /^[0-9a-f]{12,64}$/i.test(selector);
if (selector && !namedSelectors.has(selector) && !legacyHash) {
throw new Error(
'active sync selector must be candidate, campaign, delivery, dev-tool, ' +
'or a legacy hex hash',
);
}
fs.appendFileSync(process.env.GITHUB_OUTPUT, `selector=${selector}\n`);
fs.appendFileSync(process.env.GITHUB_OUTPUT, `candidate=${selector === 'candidate'}\n`);
Expand Down
4 changes: 3 additions & 1 deletion tests/workflows/test_sync_delivery_liveness.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ def test_maint71_has_proof_bound_review_resolution_and_exact_evidence_promotion(
assert "canary_evidence_json: JSON.stringify(evidence)" in workflow
assert "cancel-in-progress: false" in workflow
assert "EXCLUDED_REPOS_INPUT: stranske/Collab-Admin" in workflow
assert "active sync selector must be candidate or campaign" in workflow
assert "['candidate', 'campaign', 'delivery', 'dev-tool']" in workflow
assert "/^[0-9a-f]{12,64}$/i.test(selector)" in workflow
assert "active sync selector must be candidate, campaign, delivery, dev-tool, " in workflow
assert "'stale_closed'" in workflow
assert "paginateWithRetry(api.rest.actions.listWorkflowRuns" in workflow
assert "Maint 71 requires OWNER_PR_PAT" in executor
Expand Down
Loading