feat: Nightly news generation script and GitHub Actions workflow#344
Closed
feat: Nightly news generation script and GitHub Actions workflow#344
Conversation
- Add scripts/generate-daily-news.js: queries riksdag-regering MCP for new documents (last 24 hours), groups by type, generates articles when ≥5 documents exist, creates 14-language versions, updates indexes and sitemap - Add .github/workflows/nightly-news-generation.yml: runs at 01:00 UTC (02:00 CET winter / 03:00 CEST summer) daily, creates automated PR with generated articles, supports manual trigger with configurable options - Add generate-daily-news npm script to package.json Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Document article enhancement workflow and MCP integration patterns
feat: Nightly news generation script and GitHub Actions workflow
Feb 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automates daily article generation from Swedish Riksdag/Government data: queries MCP for documents published in the last 24 hours, applies a ≥5 document threshold per type to suppress empty articles on low-activity days, generates all 14 language versions, and refreshes indexes/sitemap.
New:
scripts/generate-daily-news.jsFour-stage pipeline reusing existing
generate-news-enhanced.jsgenerators:search_dokumentwith 24h lookback forprop,mot,bet--forceto override)Key behaviours:
0even on MCP unavailability (cold starts, outages) — scheduled workflow stays green on quiet daysnews/metadata/daily-generation-status.jsonfor downstream workflow inspectionNew:
.github/workflows/nightly-news-generation.yml0 1 * * *(01:00 UTC = 02:00 CET winter / 03:00 CEST summer)workflow_dispatchexposes all pipeline knobs:languages,threshold,lookback_hours,force_generate,dry_runpeter-evans/create-pull-requestonly when articles are actually writtenstep-security/harden-runnerwith egress audit, least-privilege permissions (contents: write,pull-requests: write)Original prompt
This section details on the original issue you should resolve
<issue_title>Document Article Enhancement Workflow and MCP Integration Patterns</issue_title>
<issue_description># 📋 Issue Type
Documentation / Knowledge Management
🎯 Objective
Create comprehensive documentation of the article enhancement workflow, MCP integration patterns, and content generation best practices based on the successful completion of Issues #306-334.
📊 Current State
Gap: While enhancement was successful, there's no consolidated documentation for:
Scattered Information: Knowledge exists across:
scripts/🚀 Desired State
Create ARTICLE_ENHANCEMENT_GUIDE.md with:
🔧 Documentation Structure
1. Workflow Overview
2. MCP Integration Patterns
Returns: title, summary, proposer, status, committee, full text
Use when: Need complete document information for analysis
Tool: get_utskott
Purpose: Get committee information
Example:
Returns: All committee names, abbreviations, jurisdictions
Use when: Need full committee names and context
[Document all 32 MCP tools with examples]