Skip to content

Comments

fix: correct batch-status.json languages and weekly-review doktyp guard#434

Merged
pethers merged 2 commits intonews-generation/weekly-review-2026-02-22-25732d3df5a3d00ffrom
copilot/sub-pr-433
Feb 22, 2026
Merged

fix: correct batch-status.json languages and weekly-review doktyp guard#434
pethers merged 2 commits intonews-generation/weekly-review-2026-02-22-25732d3df5a3d00ffrom
copilot/sub-pr-433

Conversation

Copy link
Contributor

Copilot AI commented Feb 22, 2026

batch-status.json incorrectly recorded only 4 of 14 generated languages, and weekly-review.ts was unconditionally overwriting doktyp values already returned by the API.

Changes

  • news/metadata/batch-status.jsoncompletedLanguages and allRequestedLanguages now reflect all 14 generated languages (en, sv, da, no, fi, de, fr, es, nl, ar, he, ja, ko, zh)
  • scripts/news-types/weekly-review.ts — replaced || fallback assignment with an explicit guard to preserve API-provided doktyp:
// Before — silently overwrites API value when doktyp is already set
(d as Record<string, string>).doktyp = (d as Record<string, string>).doktyp || 'bet';

// After — only sets fallback when doktyp is absent
if (!(d as Record<string, string>).doktyp) (d as Record<string, string>).doktyp = 'bet';

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI changed the title [WIP] Update weekly review for parliamentary activity February 2026 fix: correct batch-status.json languages and weekly-review doktyp guard Feb 22, 2026
Copilot AI requested a review from pethers February 22, 2026 11:19
@pethers pethers marked this pull request as ready for review February 22, 2026 11:21
@pethers pethers merged commit 2e0c033 into news-generation/weekly-review-2026-02-22-25732d3df5a3d00f Feb 22, 2026
@pethers pethers deleted the copilot/sub-pr-433 branch February 22, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants