Skip to content

Commit 5eb1995

Browse files
skyamgarpclaude
andcommitted
Fix YAML syntax error in community_pr_test workflow
Multi-line shell strings with unindented content broke the YAML block scalar. Use printf to build PR body strings within proper indentation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 753a3fa commit 5eb1995

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

.github/workflows/community_pr_test.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,16 @@ jobs:
9191
exit 0
9292
fi
9393
94+
PR_BODY=$(printf '%s\n\n%s\n%s\n%s\n\n%s' \
95+
"Automated test PR to run CI on behalf of community PR #${COMMUNITY_PR_NUMBER}." \
96+
"**Original PR:** ${COMMUNITY_PR_URL}" \
97+
"**Author:** @${COMMUNITY_PR_AUTHOR}" \
98+
"**Fork:** \`${COMMUNITY_PR_FORK}\`" \
99+
"> **Note:** This PR was created automatically when the \`ok-to-test\` label was applied. Do not merge — close it once tests complete and review the original PR instead.")
100+
94101
gh pr create \
95102
--title "[Test] Community PR #${COMMUNITY_PR_NUMBER}: ${COMMUNITY_PR_TITLE}" \
96-
--body "Automated test PR to run CI on behalf of community PR #${COMMUNITY_PR_NUMBER}.
97-
98-
**Original PR:** ${COMMUNITY_PR_URL}
99-
**Author:** @${COMMUNITY_PR_AUTHOR}
100-
**Fork:** \`${COMMUNITY_PR_FORK}\`
101-
102-
> **Note:** This PR was created automatically when the \`ok-to-test\` label was applied. Do not merge — close it once tests complete and review the original PR instead." \
103+
--body "${PR_BODY}" \
103104
--base main \
104105
--head "${BRANCH}"
105106
@@ -118,8 +119,9 @@ jobs:
118119
# Extract the original PR number from the branch name (community-pr-test-<N>)
119120
COMMUNITY_PR_NUMBER="${BRANCH#community-pr-test-}"
120121
121-
gh pr comment "${COMMUNITY_PR_NUMBER}" \
122-
--body "CI tests failed on the test PR for this community PR. Please review the failures and push a fix.
122+
COMMENT_BODY=$(printf '%s\n\n%s\n%s' \
123+
"CI tests failed on the test PR for this community PR. Please review the failures and push a fix." \
124+
"**Test PR:** ${TEST_PR_URL}" \
125+
"**CI run:** ${{ github.event.workflow_run.html_url }}")
123126
124-
**Test PR:** ${TEST_PR_URL}
125-
**CI run:** ${{ github.event.workflow_run.html_url }}"
127+
gh pr comment "${COMMUNITY_PR_NUMBER}" --body "${COMMENT_BODY}"

0 commit comments

Comments
 (0)