Skip to content

Commit 8338b7e

Browse files
Ambient Code Botclaude
andcommitted
fix: use heredoc syntax for title in GITHUB_OUTPUT
Titles with newlines or percent characters can corrupt step outputs when written with plain echo. Switch to the GitHub Actions heredoc/delimiter syntax for all three title output locations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d1267bb commit 8338b7e

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

.github/workflows/amber-issue-handler.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ jobs:
5050
NUMBER="${{ github.event.issue.number }}"
5151
TITLE=$(gh issue view "$NUMBER" --repo "${{ github.repository }}" --json title --jq '.title')
5252
echo "number=$NUMBER" >> $GITHUB_OUTPUT
53-
echo "title=$TITLE" >> $GITHUB_OUTPUT
53+
{
54+
echo "title<<EOF"
55+
echo "$TITLE"
56+
echo "EOF"
57+
} >> $GITHUB_OUTPUT
5458
5559
- name: Check for existing PR
5660
id: existing
@@ -194,7 +198,11 @@ jobs:
194198
echo "url=https://github.com/${{ github.repository }}/pull/$NUMBER" >> $GITHUB_OUTPUT
195199
196200
TITLE=$(gh pr view "$NUMBER" --repo "${{ github.repository }}" --json title --jq '.title')
197-
echo "title=$TITLE" >> $GITHUB_OUTPUT
201+
{
202+
echo "title<<EOF"
203+
echo "$TITLE"
204+
echo "EOF"
205+
} >> $GITHUB_OUTPUT
198206
199207
IS_FORK=$(gh pr view "$NUMBER" --repo "${{ github.repository }}" --json isCrossRepository --jq '.isCrossRepository')
200208
echo "is_fork=$IS_FORK" >> $GITHUB_OUTPUT
@@ -208,7 +216,11 @@ jobs:
208216
echo "url=https://github.com/${{ github.repository }}/issues/$NUMBER" >> $GITHUB_OUTPUT
209217
210218
TITLE=$(gh issue view "$NUMBER" --repo "${{ github.repository }}" --json title --jq '.title')
211-
echo "title=$TITLE" >> $GITHUB_OUTPUT
219+
{
220+
echo "title<<EOF"
221+
echo "$TITLE"
222+
echo "EOF"
223+
} >> $GITHUB_OUTPUT
212224
213225
echo "is_fork=false" >> $GITHUB_OUTPUT
214226

0 commit comments

Comments
 (0)