feat(cli): close review issues and support moved problems

This commit is contained in:
Prad Nukala committed 2026-09-30 16:23:54 -04:00
1 parent 1d77c5a8b5
commit 9c7d48aad8
3 files changed
+90 -29

No files matched your search

+7 -4
View File
@@ -11,8 +11,9 @@
* for close-topics to chain after it. The topic issue itself closes seconds
* later, on the same day.
*
* Each release is a changelog snapshot at that instant: the topic's problem
* sub-issues grouped as closed on the finish day (ET), closed earlier, and
* Each release is a changelog snapshot at that instant: the topic's problems
* (its sub-issues, plus those since re-parented into Review issues — see
* topics.ts) grouped as closed on the finish day (ET), closed earlier, and
* open at release, each with its set, difficulty, and the solution files as
* they stood in the tagged commit — the last main commit before the finish.
*
@@ -40,9 +41,10 @@
* committer identity (the tagger).
*/
import { etDate } from "../api/src/srs.ts";
import { movedFromTopics, readReviews, type Problem } from "../api/src/reviews.ts";
import { github } from "./github.ts";
import { markdownTable, printTable, writeStepSummary } from "./report.ts";
import { coreSet, labelValue, readProblems, type Problem } from "./topics.ts";
import { coreSet, labelValue, readProblems } from "./topics.ts";
import { ROOT, parseWorkPath } from "./work.ts";
const DRY =
@@ -99,10 +101,11 @@ interface Finished {
// Closed and open topics alike: the rule reads the sub-issues, so a topic
// finished moments ago (close-topics not yet run) releases now.
const finished: Finished[] = [];
const moved = movedFromTopics(await readReviews(gh));
for await (const raw of gh.list(`/repos/${gh.repo}/issues?labels=topic&state=all`)) {
const topic = readTopic(raw);
if (!topic) continue;
const problems = await readProblems(gh, topic.number);
const problems = await readProblems(gh, topic.number, moved);
const core = coreSet(problems);
if (core.finishedAt) finished.push({ topic, problems, core: core.all, finishedAt: core.finishedAt });
}