Files
OmniRoute/scripts/quality/release-acceptance/closeOracle.mjs
Bob.Hou e7214c72fc ci(acceptance): emit a shadow release-acceptance report next to release-green (#13701)
Adds a shadow release-acceptance report alongside release-green: an inventory/reduce/oracle pipeline under `scripts/quality/release-acceptance/` with a JSON schema, fixtures and a workflow that uploads the report as an artifact.

Contained by design, which is why it merges as-is: it runs only on push to `release/v*` and on manual dispatch (never on pull requests), the step is `continue-on-error`, `permissions: contents: read`, `persist-credentials: false`, and it consumes no secrets. Nothing in the product changes; the report is advisory until we decide to promote it.

Validated as a combined board first (this PR merged with the 11 siblings of the same batch on the release tip): eslint on every changed file with the suppressions file, typecheck:core, check:open-sse-typecheck, complexity, cognitive-complexity, changelog-integrity, i18n new-key coverage, docs-sync, migration-numbering, provider-consistency and a duplicate-identifier audit all green, plus 275 passing / 0 failing focused node:test cases across the 28 test files the batch touches. Then re-validated alone on the fresh tip before this merge: conflicts re-resolved, file sizes rebaselined for this PR's own growth, eslint and this PR's focused tests re-run.

Thanks @HouMinXi!
2026-09-16 03:17:52 -03:00

31 lines
870 B
JavaScript

const CLOSE_RE =
/gh issue close\b|issues\.update\b|state=closed/g;
const KEYWORD_RE = new RegExp(
String.raw`\b(?:fix(?:es|ed)?|close[sd]?|resolve[sd]?)\s+#(\d+)\b`,
"i"
);
export function findTrackerCloses(workflowText) {
const hits = [];
const lines = String(workflowText ?? "").split(/\n/);
for (let i = 0; i < lines.length; i++) {
CLOSE_RE.lastIndex = 0;
if (CLOSE_RE.test(lines[i])) {
hits.push({ line: i + 1, text: lines[i].trim() });
}
CLOSE_RE.lastIndex = 0;
}
return hits;
}
export function closingKeywordInBody(body, tracker = 12732) {
const re = new RegExp(KEYWORD_RE.source, KEYWORD_RE.flags.includes("g") ? KEYWORD_RE.flags : `${KEYWORD_RE.flags}g`);
const text = String(body ?? "");
let m;
while ((m = re.exec(text)) !== null) {
if (Number(m[1]) === Number(tracker)) return true;
}
return false;
}