Skip to content

Comments

Fix YAML syntax error in compile-agentic-workflows.yml#108

Merged
pethers merged 4 commits intomainfrom
copilot/fix-hreflang-tags
Feb 11, 2026
Merged

Fix YAML syntax error in compile-agentic-workflows.yml#108
pethers merged 4 commits intomainfrom
copilot/fix-hreflang-tags

Conversation

Copy link
Contributor

Copilot AI commented Feb 11, 2026

YAML parser failed on line 132 due to backtick collision between JavaScript template literal and embedded markdown code fences in github-script action.

Changes

Refactored issue body generation from template literal to array concatenation:

Before:

body: `## Problem
...
\`\`\`bash  // Backticks conflict with outer template literal
gh extension install github/gh-aw
\`\`\`
`,

After:

const issueBody = [
  '## Problem',
  '',
  '```bash',  // Plain strings, no conflict
  'gh extension install github/gh-aw',
  '```'
].join('\n');

body: issueBody,

Standard pattern for github-script when markdown contains code blocks.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Replace template literal with array.join() to avoid backtick conflicts.
The JavaScript template literal containing markdown code blocks caused
YAML parsing error on line 132. Now uses string concatenation instead.

Fixes workflow compilation failure on copilot/update-index-html-language-support branch.

Co-authored-by: pethers <[email protected]>
Copilot AI changed the title [WIP] Fix bidirectional hreflang tags for news language pages Fix YAML syntax error in compile-agentic-workflows.yml Feb 11, 2026
Copilot AI requested a review from pethers February 11, 2026 18:50
@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

@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

Fixes a YAML parsing failure in the actions/github-script step by refactoring the issue body construction to avoid backtick/template-literal collisions when embedding Markdown code fences in YAML.

Changes:

  • Replaced a JavaScript template literal with an array-of-lines joined by \n for the issue body.
  • Kept embedded Markdown code fences as plain strings to prevent YAML syntax errors.

Comment on lines +139 to +142
'# Compile all agentic workflows',
'cd .github/workflows',
'gh aw compile news-article-generator.md',
'',
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

The issue body says “Compile all agentic workflows”, but the command shown compiles only news-article-generator.md. Update the instructions to either loop over all .md files (matching what the workflow does) or change the heading/text to reflect that it’s a single-file compile command.

Copilot uses AI. Check for mistakes.
Comment on lines 165 to 170
const issue = await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: '⚠️ Agentic Workflow Lock Files Need Manual Compilation',
body: `## Problem

The agentic workflow markdown files have been updated, but the lock files could not be automatically compiled.

### Action Required

Please compile the lock files locally:

\`\`\`bash
# Install gh-aw extension (first time only)
gh extension install github/gh-aw

# Compile all agentic workflows
cd .github/workflows
gh aw compile news-article-generator.md

# Commit and push the updated lock files
git add *.lock.yml
git commit -m "chore: recompile agentic workflow lock files"
git push
\`\`\`

### Files Affected

- \`.github/workflows/news-article-generator.md\`
- \`.github/workflows/news-article-generator.lock.yml\`

### Why This Happened

The gh-aw tool requires GitHub authentication and is not available in the automated workflow environment.

### More Information

- [GitHub Agentic Workflows Documentation](https://github.com/github/gh-aw/blob/main/.github/aw/github-agentic-workflows.md)
- Triggered by: ${context.payload.head_commit?.message || 'Manual trigger'}
- Workflow run: ${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}
`,
body: issueBody,
labels: ['infrastructure', 'automated-issue', 'needs-action']
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

This step calls github.rest.issues.create, but the workflow-level permissions: block does not grant issues: write. With the default GITHUB_TOKEN permissions, this will typically fail with 403 and the workflow won’t be able to open the manual-compilation issue. Add issues: write (and keep least-privilege for other scopes).

Copilot uses AI. Check for mistakes.
@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

@pethers
Copy link
Member

pethers commented Feb 11, 2026

@copilot apply changes based on the comments in this thread can use

  - .github/workflows/copilot-setup-steps.yml

env:
GITHUB_TOKEN: ${{ secrets.COPILOT_MCP_GITHUB_PERSONAL_ACCESS_TOKEN }}
GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.COPILOT_MCP_GITHUB_PERSONAL_ACCESS_TOKEN }}

Copilot AI requested a review from pethers February 11, 2026 19:14
Copilot stopped work on behalf of pethers due to an error February 11, 2026 19:14
@pethers pethers marked this pull request as ready for review February 11, 2026 19:23
@pethers pethers merged commit 8f198b0 into main Feb 11, 2026
11 of 12 checks passed
@pethers pethers deleted the copilot/fix-hreflang-tags branch February 11, 2026 19:23
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