Skip to content

fix(actions): avoid empty lines in block scalar to fix legacy YAML parser#62

Open
uwe-mayer wants to merge 2 commits into
mainfrom
fix/issue-triage-empty-lines
Open

fix(actions): avoid empty lines in block scalar to fix legacy YAML parser#62
uwe-mayer wants to merge 2 commits into
mainfrom
fix/issue-triage-empty-lines

Conversation

@uwe-mayer

Copy link
Copy Markdown
Contributor

Problem

The Issue Triage workflow is still failing even after PR #61, with the same error:

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 fix in #61 replaced the heredoc with a COMMENT_BODY env variable using a YAML literal block scalar (|). However, the block scalar contained empty lines (lines with no characters at all) for paragraph breaks in the comment body.

The GitHub Actions legacy manifest parser (ActionManifestManagerLegacy) does not handle bare empty lines inside block scalar values correctly — it interprets them as potential YAML keys rather than block scalar continuations, causing the 'could not find expected :' error.

Fix

Replace the multi-line block scalar env var approach with a single printf call inside the run: step. This keeps all content on a single YAML line with \n escape sequences for newlines, and avoids any empty lines in the YAML structure entirely.

Supersedes

This supersedes PR #61.

…rser

The GitHub Actions legacy manifest parser fails on empty lines inside
YAML block scalar values (env variables). The parser interprets bare
empty lines as YAML keys rather than block scalar continuations.

Replace the multi-line COMMENT_BODY env var with a printf-based
single-line approach, avoiding all empty lines in the YAML structure.

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

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

Updates the issue-triage composite GitHub Action to avoid YAML constructs that break the GitHub Actions legacy manifest parser, addressing continued workflow failures when loading action.yaml.

Changes:

  • Removes the COMMENT_BODY YAML literal block scalar env var.
  • Inlines the comment body into the gh issue comment call via a single-line printf with \n escapes.

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

Comment thread workflows/issue-triage/action.yaml Outdated
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants