Skip to content

fix(actions): replace heredoc with env var to fix YAML parsing error - #61

Merged
uwe-mayer merged 1 commit into
mainfrom
fix/issue-triage-yaml-heredoc
Jun 17, 2026
Merged

fix(actions): replace heredoc with env var to fix YAML parsing error#61
uwe-mayer merged 1 commit into
mainfrom
fix/issue-triage-yaml-heredoc

Conversation

@uwe-mayer

Copy link
Copy Markdown
Contributor

Problem

The issue-triage workflow is failing across all repositories with:

cloudoperators/common/main/workflows/issue-triage/action.yaml: (Line: 30, Col: 1, Idx: 799) - While scanning a simple key, could not find expected ':'.

Root Cause

The heredoc syntax (cat <<'EOF') in the composite action's run: block causes the GitHub Actions manifest parser to fail. The unindented EOF delimiter at column 1 is interpreted as a YAML key by the parser.

Fix

Replace the heredoc with a COMMENT_BODY environment variable using YAML block scalar (|). This is properly parsed by both the YAML parser and the GitHub Actions manifest loader, and avoids Markdown indentation issues in the rendered comment.

The heredoc syntax (cat <<'EOF') in the composite action caused GitHub Actions
to fail with 'could not find expected :' because the unindented EOF delimiter
was interpreted as a YAML key by the action manifest parser.

Replace with a COMMENT_BODY environment variable using YAML block scalar (|),
which is properly parsed and avoids Markdown indentation issues.

Signed-off-by: uwe-mayer <uwe.mayer01@sap.com>
@uwe-mayer
uwe-mayer requested a review from a team as a code owner June 17, 2026 09:10
Copilot AI review requested due to automatic review settings June 17, 2026 09:10

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

This PR fixes a YAML parsing failure in the issue-triage composite action by removing a bash heredoc from the run: block and moving the welcome-comment text into a YAML block-scalar environment variable, which GitHub Actions’ manifest loader can parse reliably.

Changes:

  • Replaced cat <<'EOF' ... EOF heredoc usage with a multiline COMMENT_BODY env var (| block scalar).
  • Updated the gh issue comment invocation to use --body "$COMMENT_BODY".

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

@uwe-mayer
uwe-mayer merged commit c7ec5c4 into main Jun 17, 2026
3 checks passed
@uwe-mayer
uwe-mayer deleted the fix/issue-triage-yaml-heredoc branch June 17, 2026 09:22
IvoGoman pushed a commit to cloudoperators/greenhouse that referenced this pull request Jun 23, 2026
…error

The previous SHA (f87e1e6b) contained a heredoc syntax that caused the
GitHub Actions manifest parser to fail with 'could not find expected :'.

Update to c7ec5c47 which fixes the heredoc by using a YAML block scalar
env variable instead.

See: cloudoperators/common#61
Signed-off-by: uwe-mayer <uwe.mayer01@sap.com>
IvoGoman pushed a commit to cloudoperators/greenhouse that referenced this pull request Jun 23, 2026
…error (#2085)

The previous SHA (f87e1e6b) contained a heredoc syntax that caused the
GitHub Actions manifest parser to fail with 'could not find expected :'.

Update to c7ec5c47 which fixes the heredoc by using a YAML block scalar
env variable instead.

See: cloudoperators/common#61

Signed-off-by: uwe-mayer <uwe.mayer01@sap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants