-
Notifications
You must be signed in to change notification settings - Fork 1
fix(ci): YAML heredoc syntax breaks ci-cd.yml on push events #245
Description
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 YAMLThe 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:
- https://github.com/structured-world/gitlab-mcp/actions/runs/21528053724 (main)
- https://github.com/structured-world/gitlab-mcp/actions/runs/21497520930 (main)
- Multiple
chore/pr-thread-gatebranch pushes
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)