Skip to content

Commit 49ea771

Browse files
Copilotdevlux76
andcommitted
Keep TODO.md and PLAN.md, scope close-legacy-issues to explicit allowlist
- Restore TODO.md and PLAN.md (keep existing docs while GitHub-native project management is set up) - Rewrite close-legacy-issues.yml to only close the 29 specific issues created by the old sync script, not all future issues - Restore PLAN.md/TODO.md rows in README.md and copilot-instructions.md Co-authored-by: devlux76 <86517969+devlux76@users.noreply.github.com>
1 parent ea0e435 commit 49ea771

5 files changed

Lines changed: 1415 additions & 24 deletions

File tree

.github/copilot-instructions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ The engine models three biological brain regions:
1515
|---|---|
1616
| `README.md` | Product vision and quick start |
1717
| `DESIGN.md` | Complete architecture specification and design principles |
18+
| `PLAN.md` | Module-by-module implementation status and development phases |
19+
| `TODO.md` | Prioritized actionable tasks to ship v1.0 |
1820

1921
Keep `DESIGN.md` synchronized with the real code state after every implementation pass.
2022

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Close Legacy Issues
22

3-
# One-shot workflow: closes all pre-existing issues that were created by the
4-
# removed sync-github-project.mjs script. Run manually, then delete this file.
3+
# One-shot workflow: closes the 29 issues created by the removed
4+
# sync-github-project.mjs script. Run manually once, then delete this file.
55

66
on:
77
workflow_dispatch:
@@ -10,16 +10,22 @@ permissions:
1010
issues: write
1111

1212
jobs:
13-
close-all:
13+
close-legacy:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- name: Close all open issues as won't-fix
16+
- name: Close legacy sync-generated issues as won't-fix
1717
uses: actions/github-script@v7
1818
with:
1919
script: |
2020
const owner = context.repo.owner;
2121
const repo = context.repo.repo;
2222
23+
// Exact issue numbers created by the old sync-github-project.mjs script.
24+
const LEGACY_ISSUES = [
25+
21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
26+
36, 37, 38, 39, 40, 41, 42, 56, 57, 58, 59, 60, 61, 62, 63
27+
];
28+
2329
// Ensure the "wontfix" label exists
2430
try {
2531
await github.rest.issues.getLabel({ owner, repo, name: "wontfix" });
@@ -32,36 +38,32 @@ jobs:
3238
});
3339
}
3440
35-
// Paginate through all open issues
36-
let page = 1;
3741
let closed = 0;
38-
while (true) {
39-
const { data: issues } = await github.rest.issues.listForRepo({
40-
owner, repo,
41-
state: "open",
42-
per_page: 100,
43-
page,
44-
});
45-
if (issues.length === 0) break;
46-
47-
for (const issue of issues) {
48-
// Skip pull requests (they appear in the issues API)
49-
if (issue.pull_request) continue;
50-
42+
for (const num of LEGACY_ISSUES) {
43+
try {
44+
const { data: issue } = await github.rest.issues.get({
45+
owner, repo,
46+
issue_number: num,
47+
});
48+
if (issue.state === "closed") {
49+
console.log(`#${num} already closed — skipping`);
50+
continue;
51+
}
5152
await github.rest.issues.addLabels({
5253
owner, repo,
53-
issue_number: issue.number,
54+
issue_number: num,
5455
labels: ["wontfix"],
5556
});
5657
await github.rest.issues.update({
5758
owner, repo,
58-
issue_number: issue.number,
59+
issue_number: num,
5960
state: "closed",
6061
state_reason: "not_planned",
6162
});
62-
console.log(`Closed #${issue.number}: ${issue.title}`);
63+
console.log(`Closed #${num}: ${issue.title}`);
6364
closed++;
65+
} catch (err) {
66+
console.log(`#${num}: skipped (${err.message})`);
6467
}
65-
page++;
6668
}
67-
console.log(`\nDone — closed ${closed} issues.`);
69+
console.log(`\nDone — closed ${closed} legacy issues.`);

0 commit comments

Comments
 (0)