Skip to content

github-actions: fix YAML parse error in lt-rebase-merge heredocs#1391

Open
bmastbergen wants to merge 1 commit into
mainfrom
{bmastbergen}_fix-ltrm-yaml-heredocs
Open

github-actions: fix YAML parse error in lt-rebase-merge heredocs#1391
bmastbergen wants to merge 1 commit into
mainfrom
{bmastbergen}_fix-ltrm-yaml-heredocs

Conversation

@bmastbergen

Copy link
Copy Markdown
Collaborator

Heredocs (<<EOF...EOF) inside YAML run: | blocks had their EOF terminators at column 1, which the YAML parser interprets as ending the block scalar. This caused the entire workflow file to fail parsing, silently preventing issue_comment events from triggering the workflow since commit a4bd60a.

Replace --body-file heredocs with --body using shell variables, which avoids the YAML indentation conflict entirely.

@bmastbergen bmastbergen requested a review from roxanan1996 June 29, 2026 15:02
Copilot AI review requested due to automatic review settings June 29, 2026 15:02

Copilot AI left a comment

Copy link
Copy Markdown

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 GitHub Actions workflow YAML parsing failure caused by bash heredoc terminators (EOF) appearing at column 1 inside run: | block scalars, which can prematurely terminate the YAML block and prevent the workflow from loading/triggering.

Changes:

  • Replaces gh pr comment --body-file - <<EOF ... EOF heredocs with --body using a COMMENT_BODY shell variable to avoid YAML indentation conflicts.
  • Updates multiple PR-comment sites in the workflow (parking PRs, restore/retarget, failure paths) to use the new string construction approach.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/lt-rebase-merge.yml Outdated
Comment thread .github/workflows/lt-rebase-merge.yml Outdated
Comment thread .github/workflows/lt-rebase-merge.yml Outdated
Comment thread .github/workflows/lt-rebase-merge.yml Outdated
Comment thread .github/workflows/lt-rebase-merge.yml Outdated
Comment thread .github/workflows/lt-rebase-merge.yml Outdated
Heredocs (<<EOF...EOF) inside YAML run: | blocks had their EOF
terminators at column 1, which the YAML parser interprets as ending
the block scalar. This caused the entire workflow file to fail
parsing, silently preventing issue_comment events from triggering
the workflow since commit a4bd60a.

Replace --body-file heredocs with --body using shell variables,
which avoids the YAML indentation conflict entirely.

Signed-off-by: Brett Mastbergen <bmastbergen@ciq.com>
@bmastbergen bmastbergen force-pushed the {bmastbergen}_fix-ltrm-yaml-heredocs branch from 75be051 to 46ffc8b Compare June 29, 2026 15:24

@PlaidCat PlaidCat left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

:shipit:

its so wild to me to see printf rather than echo or just the string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants