Skip to content

Conversation

@pdodgen-revparts
Copy link
Contributor

Summary

Fixes shell syntax errors that occur when PR title/body contains special characters like parentheses.

Problem:
The workflow was directly interpolating ${{ github.event.pull_request.body }} into shell scripts, which caused syntax errors when the PR body contained shell metacharacters like (, ), $, backticks, etc.

Example error:

/home/runner/work/_temp/694052c8-278e-4e47-9605-3fbb9600951c.sh: line 21: syntax error near unexpected token `('

Solution:
Use env: blocks to pass PR body, title, and other user-supplied content as environment variables instead of direct interpolation. This safely handles special characters.

Before:

run: |
  PR_BODY=$(printf '%s' "${{ github.event.pull_request.body }}")

After:

env:
  PR_BODY: ${{ github.event.pull_request.body }}
run: |
  # PR_BODY is now safely available as an environment variable

Test plan

  • Create a test PR with parentheses in the title like fix(something): description
  • Verify the jira-ticket-check workflow passes without syntax errors

@pdodgen-revparts pdodgen-revparts requested a review from a team as a code owner February 9, 2026 16:38
@pdodgen-revparts pdodgen-revparts merged commit 4238af3 into main Feb 9, 2026
1 check failed
@pdodgen-revparts pdodgen-revparts deleted the DEVEX-723-fix-pr-body-parsing branch February 9, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant