From a195dbaf3a48caf8a76137e55ef3a85524eb5de0 Mon Sep 17 00:00:00 2001 From: Simon van Lierde <90462640+simonvanlierde@users.noreply.github.com> Date: Tue, 17 Nov 2026 17:10:03 +0100 Subject: [PATCH] fix(drift): add a paste-ready leftOut entry and a blank line to the drift issue - each unlisted merged PR line now names the leftOut entry to paste, so an owner-interest PR (as in #162) needs no lookup - the issue footer starts after a blank line: right after a list item, Markdown folded it into the last item (visible in #162) Signed-off-by: Simon van Lierde <90462640+simonvanlierde@users.noreply.github.com> --- .github/workflows/check-drift.yml | 2 ++ scripts/evidence.mjs | 4 +++- tests/unit/evidence.test.ts | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-drift.yml b/.github/workflows/check-drift.yml index 1a6c0aa..a1824d0 100644 --- a/.github/workflows/check-drift.yml +++ b/.github/workflows/check-drift.yml @@ -43,7 +43,9 @@ jobs: [ -n "$issue" ] && gh issue close "$issue" --comment "Nothing behind any more." exit 0 fi + # A blank line first: right after a list item, Markdown folds this text into the last item. body="$report + Repos to leave off both pages go in \`.github/drift-ignore\`, one name per line. Merged PRs or whole repos to leave off go in \`leftOut\` in \`src/data/upstream.ts\`." if [ -n "$issue" ]; then diff --git a/scripts/evidence.mjs b/scripts/evidence.mjs index 1f843cc..1d29f48 100644 --- a/scripts/evidence.mjs +++ b/scripts/evidence.mjs @@ -60,7 +60,9 @@ export function evidenceDrift({ curated, leftOut, merged, fetchedAt, today }) { for (const pr of merged) { const k = key(pr.repo, pr.number); if (!listed.has(k) && !skipped.has(k) && !skipped.has(pr.repo.toLowerCase())) { - lines.push(`- merged [${pr.repo}#${pr.number}](https://github.com/${pr.repo}/pull/${pr.number}) is not listed`); + lines.push( + `- merged [${pr.repo}#${pr.number}](https://github.com/${pr.repo}/pull/${pr.number}) is not listed; to keep it off, add \`"${pr.repo}#${pr.number}"\` to \`leftOut\``, + ); } } for (const u of curated) { diff --git a/tests/unit/evidence.test.ts b/tests/unit/evidence.test.ts index 8f8f46a..c3fe977 100644 --- a/tests/unit/evidence.test.ts +++ b/tests/unit/evidence.test.ts @@ -74,6 +74,8 @@ test("evidenceDrift flags unlisted merged PRs, listed PRs not merged and a stale }); assert.match(report, /merged \[a\/new#5\]\(https:\/\/github\.com\/a\/new\/pull\/5\)/); assert.match(report, /merged \[a\/list#10\]/); + // Each line carries the entry to paste into leftOut, so a PR that should stay off needs no lookup. + assert.match(report, /add `"a\/new#5"` to `leftOut`/); assert.doesNotMatch(report, /a\/list#9|a\/b#1\b|a\/hobby/); assert.match(report, /listed `a\/b#2` is not among the merged/); assert.match(report, /was last fetched on 2026-09-01, 58 days ago/);