@@ -19,25 +19,30 @@ jobs:
1919 JIRA_BASE_URL : ${{ secrets.JIRA_BASE_URL }}
2020 JIRA_USER_EMAIL : ${{ secrets.JIRA_USER_EMAIL }}
2121 JIRA_API_TOKEN : ${{ secrets.JIRA_API_TOKEN }}
22- ISSUE_URL : ${{ github.event.issue.html_url }}
2322 run : |
2423 # debug
2524 set -x
2625 # Escape special characters in title and body
2726 TITLE=$(echo '${{ github.event.issue.title }}' | sed 's/"/\\"/g' | sed "s/'/\\\'/g")
28- BODY=$(echo '${{ github.event.issue.body }}' | sed 's/"/\\"/g' | sed "s/'/\\\'/g")
29- DESCRIPTION="$BODY\\n\\n_Created from GitHub Action_ for $ISSUE_URL"
27+
28+ read -r -d '' TMP_BODY <<'EOF'
29+ ${{ github.event.issue.body }}
30+
31+
32+ _Created from GitHub Action_ for ${{ github.event.issue.html_url }}
33+ EOF
34+
35+ BODY=$(echo "$TMP_BODY" | sed 's/"/\\"/g' | sed "s/'/\\\'/g")
36+
3037 PAYLOAD=$(jq -n \
3138 --arg issuetitle "$TITLE" \
3239 --arg issuebody "$BODY" \
33- --arg issueurl "$ISSUE_URL" \
34- --arg description "$DESCRIPTION" \
3540 '{
3641 fields: {
3742 project: { key: "SNOW" },
3843 issuetype: { name: "Bug" },
3944 summary: $issuetitle,
40- description: $description ,
45+ description: $issuebody ,
4146 customfield_11401: { id: "14723" },
4247 assignee: { id: "712020:e527ae71-55cc-4e02-9217-1ca4ca8028a2" },
4348 components: [{ id: "16413" }],
0 commit comments