fix: YAML syntax error in ci.yml caused by heredoc body at column 0#23895
Merged
fix: YAML syntax error in ci.yml caused by heredoc body at column 0#23895
Conversation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/588ddde2-b1a5-4de6-ad56-c9a67155e57e Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
pelikhan
April 1, 2026 13:06
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a YAML parsing error in the CI workflow caused by an unindented bash heredoc body inside a run: | block.
Changes:
- Replaces the inline
python3 - <<'PYEOF'heredoc with aprintf '%s\n' ... > /tmp/...approach so all script content stays indented within the YAML literal block. - Executes the generated temporary Python script to collect relative import paths from the added workflow.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+2659
to
+2660
| > /tmp/gh-aw-check-imports.py | ||
| RELATIVE_IMPORTS=$(python3 /tmp/gh-aw-check-imports.py "$WORKFLOW") |
There was a problem hiding this comment.
The script is written to a predictable path in /tmp. Using a fixed filename can be vulnerable to symlink/hardlink tricks and can also collide if this step is ever reused in a context where multiple instances run on the same machine. Prefer creating the file with mktemp (or under $RUNNER_TEMP) and cleaning it up with a trap before invoking python.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A bash heredoc (
<<'PYEOF') inside arun: |block had its body at column 0, which terminates YAML's literal block scalar early and causes a parse error.Change
Replaced the heredoc with
printf '%s\n'lines writing to a temp file, keeping all content properly indented within the YAML block scalar: