Skip to content

Commit d99d0a8

Browse files
NO-SNOW fix jira creation workflow (#2703)
1 parent 3427a80 commit d99d0a8

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/jira_issue.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,20 @@ 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_TITLE: ${{ github.event.issue.title }}
23+
ISSUE_BODY: ${{ github.event.issue.body }}
24+
ISSUE_URL: ${{ github.event.issue.html_url }}
2225
run: |
2326
# debug
2427
set -x
2528
TMP_BODY=$(mktemp)
2629
trap "rm -f $TMP_BODY" EXIT
2730
2831
# Escape special characters in title and body
29-
TITLE=$(echo '${{ github.event.issue.title }}' | sed 's/"/\\"/g' | sed "s/'/\\\'/g")
30-
31-
echo "${{ github.event.issue.body }}" > $TMP_BODY
32-
echo -e "\n\n_Created from GitHub Action_ for ${{ github.event.issue.html_url }}" >> $TMP_BODY
33-
BODY=$(cat "$TMP_BODY" | sed 's/"/\\"/g' | sed "s/'/\\\'/g")
32+
TITLE=$(echo "${ISSUE_TITLE//`/\\`}" | sed 's/"/\\"/g' | sed "s/'/\\\'/g")
33+
echo "${ISSUE_BODY//`/\\`}" | sed 's/"/\\"/g' | sed "s/'/\\\'/g" > $TMP_BODY
34+
echo -e "\n\n_Created from GitHub Action_ for $ISSUE_URL" >> $TMP_BODY
35+
BODY=$(cat "$TMP_BODY")
3436
3537
PAYLOAD=$(jq -n \
3638
--arg issuetitle "$TITLE" \

0 commit comments

Comments
 (0)