Skip to content

Commit 3427a80

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

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

.github/workflows/jira_issue.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,15 @@ jobs:
2222
run: |
2323
# debug
2424
set -x
25+
TMP_BODY=$(mktemp)
26+
trap "rm -f $TMP_BODY" EXIT
27+
2528
# Escape special characters in title and body
2629
TITLE=$(echo '${{ github.event.issue.title }}' | sed 's/"/\\"/g' | sed "s/'/\\\'/g")
2730
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")
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")
3634
3735
PAYLOAD=$(jq -n \
3836
--arg issuetitle "$TITLE" \

0 commit comments

Comments
 (0)