Merge remote-tracking branch 'origin/pr-3927' into stewardship/20261116

This commit is contained in:
haelyra committed 2026-11-16 13:20:46 -05:00
commit d30f5caa28
1 file changed
+5 -3
+5 -3
View File
@@ -176,12 +176,14 @@ function run() {
check('CLI fixture: page-two issue is audited and failed comments report incomplete', () => {
const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'audit-cli-'));
const stub = path.join(tmp, 'stub-gh.js');
// The CLI reads the real clock, so keep its fixture inside the audit window.
const recentClosedAt = new Date(Date.now() - 24 * 60 * 60 * 1000).toISOString();
fs.writeFileSync(stub, `
const args = process.argv.slice(2);
const url = args.find((a) => a.includes('/issues?state=closed')) || '';
if (url) {
const page1 = [{ number: 1, state: 'closed', closed_at: '2026-10-11T00:00:00Z', html_url: 'u1', title: 'a', body: 'no refs here' }];
const page2 = [{ number: 88, state: 'closed', closed_at: '2026-10-11T00:00:00Z', html_url: 'u88', title: 'page two', body: 'no refs either' }];
const page1 = [{ number: 1, state: 'closed', closed_at: ${JSON.stringify(recentClosedAt)}, html_url: 'u1', title: 'a', body: 'no refs here' }];
const page2 = [{ number: 88, state: 'closed', closed_at: ${JSON.stringify(recentClosedAt)}, html_url: 'u88', title: 'page two', body: 'no refs either' }];
process.stdout.write(JSON.stringify([page1, page2]));
return;
}
@@ -190,7 +192,7 @@ function run() {
process.exit(1);
}
if (args.some((a) => a.includes('/issues/1/comments'))) {
process.stdout.write(JSON.stringify([{ body: 'Delivered through #3500', html_url: 'c1', created_at: '2026-10-11T00:00:00Z' }]));
process.stdout.write(JSON.stringify([{ body: 'Delivered through #3500', html_url: 'c1', created_at: ${JSON.stringify(recentClosedAt)} }]));
return;
}
if (args.some((a) => a.includes('/pulls/'))) {