Skip to content

Commit 2ef2ea8

Browse files
committed
fix(issue-auto-implement): use content-safe heredoc delimiters for pr_title/pr_body
PR_TITLE_DELIM and PR_BODY_DELIM can appear inside Claude-generated .pr_title or .pr_body content, which ends the heredoc early and causes 'Matching delimiter not found'. Use unique delimiters that cannot appear in user content (__HOOKDECK_PR_TITLE_END_8a3f2b1c9d4e__ and __HOOKDECK_PR_BODY_END_8a3f2b1c9d4e__). Made-with: Cursor
1 parent 7f281a2 commit 2ef2ea8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/actions/issue-auto-implement/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ runs:
234234
if [ "$VERIFY_EXIT" -eq 0 ]; then
235235
# Pass PR meta to Create PR step via outputs (files are Claude handoff only; do not re-read in next step)
236236
PR_DIR=".github/actions/issue-auto-implement"
237-
if [ -f "$PR_DIR/.pr_title" ]; then echo "pr_title<<PR_TITLE_DELIM" >> $GITHUB_OUTPUT; cat "$PR_DIR/.pr_title" >> $GITHUB_OUTPUT; echo "PR_TITLE_DELIM" >> $GITHUB_OUTPUT; else echo "pr_title=Implement issue #${ISSUE_NUMBER}" >> $GITHUB_OUTPUT; fi
238-
if [ -f "$PR_DIR/.pr_body" ]; then echo "pr_body<<PR_BODY_DELIM" >> $GITHUB_OUTPUT; cat "$PR_DIR/.pr_body" >> $GITHUB_OUTPUT; echo "PR_BODY_DELIM" >> $GITHUB_OUTPUT; else echo "pr_body=Closes #${ISSUE_NUMBER}" >> $GITHUB_OUTPUT; fi
237+
if [ -f "$PR_DIR/.pr_title" ]; then echo "pr_title<<__HOOKDECK_PR_TITLE_END_8a3f2b1c9d4e__" >> $GITHUB_OUTPUT; cat "$PR_DIR/.pr_title" >> $GITHUB_OUTPUT; echo "__HOOKDECK_PR_TITLE_END_8a3f2b1c9d4e__" >> $GITHUB_OUTPUT; else echo "pr_title=Implement issue #${ISSUE_NUMBER}" >> $GITHUB_OUTPUT; fi
238+
if [ -f "$PR_DIR/.pr_body" ]; then echo "pr_body<<__HOOKDECK_PR_BODY_END_8a3f2b1c9d4e__" >> $GITHUB_OUTPUT; cat "$PR_DIR/.pr_body" >> $GITHUB_OUTPUT; echo "__HOOKDECK_PR_BODY_END_8a3f2b1c9d4e__" >> $GITHUB_OUTPUT; else echo "pr_body=Closes #${ISSUE_NUMBER}" >> $GITHUB_OUTPUT; fi
239239
echo "verified=true" >> $GITHUB_OUTPUT
240240
echo "changes_pushed=$CHANGES_PUSHED" >> $GITHUB_OUTPUT
241241
exit 0

0 commit comments

Comments
 (0)