ci: fix YAML syntax error in release-on-main workflow#169
Merged
benvinegar merged 2 commits intomainfrom Feb 24, 2026
Merged
Conversation
The heredoc body for the Claude prompt was flush-left, breaking out of the YAML block scalar. The YAML parser saw 'Allowed outputs:' as a mapping key, causing a parse error at line 104. Fix: replace cat heredoc with read -r -d '' and indent the body to match surrounding script indentation.
Greptile SummaryFixes a YAML syntax error in the
Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[YAML run: block scalar] --> B[Shell script extracted]
B --> C["read -r -d '' PROMPT <<'PROMPT_EOF' || true"]
C --> D[Heredoc content captured in PROMPT variable]
D --> E[jq builds Anthropic API payload with $PROMPT]
E --> F[curl sends request to Claude API]
F --> G[Parse response JSON for release decision]
style C fill:#90EE90,stroke:#333
style A fill:#87CEEB,stroke:#333
Last reviewed commit: 8ff62c9 |
The indented heredoc preserves leading whitespace in the PROMPT variable. Add a sed pass to strip the 10-space YAML indent so the prompt text sent to the Claude API is clean.
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.
Problem
The heredoc body for the Claude prompt in
release-on-main.ymlwas flush-left (unindented), which broke out of the YAMLrun: |block scalar. The YAML parser sawAllowed outputs:on line 105 as a mapping key, causing a parse error at line 104.Fix
Replaced
$(cat <<'EOF' ... EOF)withread -r -d '' PROMPT <<'PROMPT_EOF' || trueand indented all heredoc content to match surrounding script indentation.|| trueis needed becausereadreturns non-zero when hitting EOF with-d '', which would otherwise tripset -e.Validation