Skip to content

fix(ci): YAML heredoc syntax breaks ci-cd.yml on push events #245

@polaz

Description

@polaz

Problem

The ci-cd.yml workflow fails on all push events since #243 was merged. The pull_request events succeed, but every push to main produces:

"This run likely failed because of a workflow file issue."
"You have an error in your yaml syntax on line 140"

Zero jobs are created — the workflow never starts.

Root Cause

The review-thread-gate job uses bash heredoc (<<'EOF') inside a run: | YAML literal block scalar. The heredoc content (GraphQL query) starts at column 0, which violates YAML block scalar rules — all content lines must be indented at least as much as the first content line (10 spaces in this case).

        run: |
          ...
              QUERY=$(cat <<'EOF'
query($owner:String!, $name:String!, $number:Int!) {   # <-- column 0, breaks YAML

The YAML parser interprets the unindented line as the end of the run: block and tries to parse query(...) as a new YAML node, which fails.

Affected Runs

All push events since #243:

Last successful push: https://github.com/structured-world/gitlab-mcp/actions/runs/21427003559 (before #243)

Fix

Replace heredoc syntax with bash single-quoted strings. GraphQL ignores extra whitespace, so indented queries work identically.

Time estimate: 30m (fix + verify CI passes)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions