Fix gh-aw workflow_dispatch parameter passing to agentic workflows#429
Merged
Fix gh-aw workflow_dispatch parameter passing to agentic workflows#429
Conversation
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
Contributor
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
Contributor
There was a problem hiding this comment.
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.ymlfiles to includeGH_AW_GITHUB_EVENT_INPUTS_FORCE_GENERATIONenvironment 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 |
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.
workflow_dispatchinputs (article_types, force_generation, languages) were never reaching the agent. When triggering witharticle_types=weekly-review, the agent fell back to day-of-week defaults and generatedcommittee-reports,propositions,motionsinstead.Root cause
Two issues in the gh-aw interpolation pipeline:
${{ }}inside markdown code blocks are not substituted. The.mdbody hadARTICLE_TYPES="${{ github.event.inputs.article_types }}"inside triple-backtick code fences. The gh-awinterpolate_prompt.cjsstep skips these — the agent received literal${{ }}text, which evaluated to empty in bash, triggering the day-of-week fallback.force_generationhad zero env var mapping. The compiler only generatesGH_AW_GITHUB_EVENT_INPUTS_*mappings for inputs referenced with${{ }}syntax in the body.force_generationwas only mentioned as descriptive text, never with${{ }}.Fix
.mdbody with${{ }}references outside code blocks, where gh-aw substitution actually works:${{ }}from bash code blocks — replaced with instructional placeholders since the agent reads the substituted values from the parameters section abovenews-article-generator.md+ 7 per-type workflows (committee-reports, propositions, motions, week-ahead, month-ahead, weekly-review, monthly-review).lock.ymlfiles — verifiedforce_generationnow appears insubstitute_placeholdersmapping (was previously absent)Verification
Before (lock.yml substitution map):
After:
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.