Skip to content

Comments

Fix gh-aw workflow_dispatch parameter passing to agentic workflows#429

Merged
pethers merged 2 commits intomainfrom
copilot/fix-agentic-workflow-parameters
Feb 22, 2026
Merged

Fix gh-aw workflow_dispatch parameter passing to agentic workflows#429
pethers merged 2 commits intomainfrom
copilot/fix-agentic-workflow-parameters

Conversation

Copy link
Contributor

Copilot AI commented Feb 22, 2026

workflow_dispatch inputs (article_types, force_generation, languages) were never reaching the agent. When triggering with article_types=weekly-review, the agent fell back to day-of-week defaults and generated committee-reports,propositions,motions instead.

Root cause

Two issues in the gh-aw interpolation pipeline:

  1. ${{ }} inside markdown code blocks are not substituted. The .md body had ARTICLE_TYPES="${{ github.event.inputs.article_types }}" inside triple-backtick code fences. The gh-aw interpolate_prompt.cjs step skips these — the agent received literal ${{ }} text, which evaluated to empty in bash, triggering the day-of-week fallback.

  2. force_generation had zero env var mapping. The compiler only generates GH_AW_GITHUB_EVENT_INPUTS_* mappings for inputs referenced with ${{ }} syntax in the body. force_generation was only mentioned as descriptive text, never with ${{ }}.

Fix

  • Add "Workflow Dispatch Parameters" section at the top of each .md body with ${{ }} references outside code blocks, where gh-aw substitution actually works:
## 🔧 Workflow Dispatch Parameters

- **article_types** = `${{ github.event.inputs.article_types }}`
- **force_generation** = `${{ github.event.inputs.force_generation }}`
- **languages** = `${{ github.event.inputs.languages }}`
  • Remove ${{ }} from bash code blocks — replaced with instructional placeholders since the agent reads the substituted values from the parameters section above
  • Applied to all 8 workflows: news-article-generator.md + 7 per-type workflows (committee-reports, propositions, motions, week-ahead, month-ahead, weekly-review, monthly-review)
  • Recompiled all .lock.yml files — verified force_generation now appears in substitute_placeholders mapping (was previously absent)

Verification

Before (lock.yml substitution map):

GH_AW_GITHUB_EVENT_INPUTS_ARTICLE_TYPES: ...
GH_AW_GITHUB_EVENT_INPUTS_LANGUAGES: ...
// force_generation: missing

After:

GH_AW_GITHUB_EVENT_INPUTS_ARTICLE_TYPES: ...
GH_AW_GITHUB_EVENT_INPUTS_FORCE_GENERATION: ...
GH_AW_GITHUB_EVENT_INPUTS_LANGUAGES: ...

All 14 workflow architecture tests and 35 MCP query tests pass.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Root cause: ${{ github.event.inputs.* }} expressions inside markdown
code blocks were not being substituted by the gh-aw interpolation
pipeline. The agent never saw the actual parameter values and fell
back to day-of-week defaults.

Changes:
- Add explicit "Workflow Dispatch Parameters" section with ${{ }}
  references OUTSIDE code blocks so gh-aw substitution works
- Add force_generation context variable (was completely unmapped)
- Update bash code blocks to reference substituted values
- Apply same fix to all 7 per-type news workflows
- Recompile all 8 lock.yml files

Co-authored-by: pethers <[email protected]>
Copilot AI changed the title [WIP] Fix parameter handling in agentic workflow for article generation Fix gh-aw workflow_dispatch parameter passing to agentic workflows Feb 22, 2026
Copilot AI requested a review from pethers February 22, 2026 04:59
@pethers pethers requested a review from Copilot February 22, 2026 05:01
@github-actions github-actions bot added documentation Documentation updates workflow GitHub Actions workflows ci-cd CI/CD pipeline changes news News articles and content generation agentic-workflow Agentic workflow changes size-m Medium change (50-250 lines) labels Feb 22, 2026
@github-actions
Copy link
Contributor

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a critical bug in gh-aw agentic workflow parameter passing where workflow_dispatch inputs (article_types, force_generation, languages) were not reaching the agent. The root cause was two-fold: (1) ${{ }} syntax inside markdown code blocks is not substituted by gh-aw's interpolation pipeline, and (2) force_generation had no environment variable mapping because it was never referenced with ${{ }} syntax.

Changes:

  • Added "Workflow Dispatch Parameters" sections with ${{ }} expressions outside code blocks in all 8 news workflows
  • Updated bash code blocks to use instructional placeholders that reference the substituted parameter values
  • Recompiled all .lock.yml files to include GH_AW_GITHUB_EVENT_INPUTS_FORCE_GENERATION environment variable mappings

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/news-weekly-review.md Added Workflow Dispatch Parameters section with ${{ }} expressions for force_generation and languages; updated bash code to use placeholder referencing the section above
.github/workflows/news-weekly-review.lock.yml Added GH_AW_GITHUB_EVENT_INPUTS_FORCE_GENERATION env var mappings to Create prompt, Interpolate variables, and Substitute placeholders steps
.github/workflows/news-week-ahead.md Added Workflow Dispatch Parameters section with ${{ }} expressions for force_generation and languages; updated bash code to use placeholder
.github/workflows/news-week-ahead.lock.yml Added GH_AW_GITHUB_EVENT_INPUTS_FORCE_GENERATION env var mappings across workflow steps
.github/workflows/news-propositions.md Added Workflow Dispatch Parameters section with ${{ }} expressions for force_generation and languages; updated bash code to use placeholder
.github/workflows/news-propositions.lock.yml Added GH_AW_GITHUB_EVENT_INPUTS_FORCE_GENERATION env var mappings across workflow steps
.github/workflows/news-motions.md Added Workflow Dispatch Parameters section with ${{ }} expressions for force_generation and languages; updated bash code to use placeholder
.github/workflows/news-motions.lock.yml Added GH_AW_GITHUB_EVENT_INPUTS_FORCE_GENERATION env var mappings across workflow steps
.github/workflows/news-monthly-review.md Added Workflow Dispatch Parameters section with ${{ }} expressions for force_generation and languages; updated bash code to use placeholder
.github/workflows/news-monthly-review.lock.yml Added GH_AW_GITHUB_EVENT_INPUTS_FORCE_GENERATION env var mappings across workflow steps
.github/workflows/news-month-ahead.md Added Workflow Dispatch Parameters section with ${{ }} expressions for force_generation and languages; updated bash code to use placeholder
.github/workflows/news-month-ahead.lock.yml Added GH_AW_GITHUB_EVENT_INPUTS_FORCE_GENERATION env var mappings across workflow steps
.github/workflows/news-committee-reports.md Added Workflow Dispatch Parameters section with ${{ }} expressions for force_generation and languages; updated bash code to use placeholder
.github/workflows/news-committee-reports.lock.yml Added GH_AW_GITHUB_EVENT_INPUTS_FORCE_GENERATION env var mappings across workflow steps
.github/workflows/news-article-generator.md Added comprehensive Workflow Dispatch Parameters section with article_types, force_generation, and languages; updated multiple bash code blocks to use placeholders; enhanced parameter interpretation instructions
.github/workflows/news-article-generator.lock.yml Added GH_AW_GITHUB_EVENT_INPUTS_FORCE_GENERATION env var mappings across workflow steps

@pethers pethers marked this pull request as ready for review February 22, 2026 05:06
@pethers pethers merged commit 2268005 into main Feb 22, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agentic-workflow Agentic workflow changes ci-cd CI/CD pipeline changes documentation Documentation updates news News articles and content generation size-m Medium change (50-250 lines) workflow GitHub Actions workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants