fix: Multiline output encoding (EOF syntax)#5
Conversation
Problem: PR body with markdown headers causes GITHUB_OUTPUT parse error. Error: Invalid format '## Purpose' Solution: Use heredoc syntax (EOF delimiter) for multiline values: echo "key<<EOF" echo "$VALUE" echo "EOF" Ref: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
|
Note Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported. |
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
User description
Fix
Resolve GITHUB_OUTPUT parse error for multiline PR body.
Problem
Root cause: PR body with markdown headers (
## Purpose) triggers parse error inGITHUB_OUTPUTwhen using simple assignment.Solution
Use heredoc EOF syntax per GitHub Actions docs:
{ echo "key<<EOF" echo "$MULTILINE_VALUE" echo "EOF" } >> "$GITHUB_OUTPUT"Why This Is THE Final Fix
✅ Handles markdown headers
✅ Handles special chars
✅ GitHub Actions official pattern
✅ Tested on PR body with
##headersThis unblocks end-to-end workflow execution!
PR Type
Bug fix
Description
Fix multiline output encoding using EOF syntax
Resolve GITHUB_OUTPUT parse error for PR bodies
Handle markdown headers and special characters properly
Use GitHub Actions official heredoc pattern
Diagram Walkthrough
File Walkthrough
claude-pr-assistant.yml
Implement EOF syntax for multiline outputs.github/workflows/claude-pr-assistant.yml
Note
Use heredoc (<<EOF) for PR title/body outputs in the workflow to correctly handle multiline PR metadata.
.github/workflows/claude-pr-assistant.ymlto write PR metadata outputs (title,body) toGITHUB_OUTPUTusing heredoc<<EOFsyntax to support multiline values and avoid parse errors.Written by Cursor Bugbot for commit 5904855. This will update automatically on new commits. Configure here.