From 8611ea0933f17f24f84ef403802f070aa18f9416 Mon Sep 17 00:00:00 2001 From: sfc-gh-dszmolka Date: Thu, 4 Dec 2025 09:40:11 +0100 Subject: [PATCH] . --- .github/workflows/jira_issue.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/jira_issue.yml b/.github/workflows/jira_issue.yml index 4fb56a595..ecceb481a 100644 --- a/.github/workflows/jira_issue.yml +++ b/.github/workflows/jira_issue.yml @@ -19,25 +19,30 @@ jobs: JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} - ISSUE_URL: ${{ github.event.issue.html_url }} run: | # debug set -x # Escape special characters in title and body TITLE=$(echo '${{ github.event.issue.title }}' | sed 's/"/\\"/g' | sed "s/'/\\\'/g") - BODY=$(echo '${{ github.event.issue.body }}' | sed 's/"/\\"/g' | sed "s/'/\\\'/g") - DESCRIPTION="$BODY\\n\\n_Created from GitHub Action_ for $ISSUE_URL" + + read -r -d '' TMP_BODY <<'EOF' + ${{ github.event.issue.body }} + + + _Created from GitHub Action_ for ${{ github.event.issue.html_url }} + EOF + + BODY=$(echo "$TMP_BODY" | sed 's/"/\\"/g' | sed "s/'/\\\'/g") + PAYLOAD=$(jq -n \ --arg issuetitle "$TITLE" \ --arg issuebody "$BODY" \ - --arg issueurl "$ISSUE_URL" \ - --arg description "$DESCRIPTION" \ '{ fields: { project: { key: "SNOW" }, issuetype: { name: "Bug" }, summary: $issuetitle, - description: $description, + description: $issuebody, customfield_11401: { id: "14723" }, assignee: { id: "712020:e527ae71-55cc-4e02-9217-1ca4ca8028a2" }, components: [{ id: "16413" }],