From 9abe5ab047c334b6836588e4aa4139c93f67f953 Mon Sep 17 00:00:00 2001 From: YIZIHN Date: Mon, 24 Jun 2024 16:48:48 +0900 Subject: [PATCH] Update create-jira-issue.yml --- .github/workflows/create-jira-issue.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/create-jira-issue.yml b/.github/workflows/create-jira-issue.yml index 6cad2363..a346feb8 100644 --- a/.github/workflows/create-jira-issue.yml +++ b/.github/workflows/create-jira-issue.yml @@ -26,6 +26,7 @@ jobs: run: | ISSUE_TITLE="${{ github.event.issue.title }}" ISSUE_BODY="${{ github.event.issue.body }}" + echo "Creating Jira issue with title: $ISSUE_TITLE and body: $ISSUE_BODY" RESPONSE=$(curl -D- \ -u "$JIRA_EMAIL:$JIRA_API_TOKEN" \ -X POST \ @@ -43,8 +44,8 @@ jobs: }' \ -H "Content-Type: application/json" \ "$JIRA_BASE_URL/rest/api/2/issue/") - echo "$RESPONSE" - JIRA_ISSUE_KEY=$(echo "$RESPONSE" | grep -oP '(?<=issue\/key\/)\w+-\d+') + echo "Jira API response: $RESPONSE" + JIRA_ISSUE_KEY=$(echo "$RESPONSE" | grep -oP '(?<=key\":\")\w+-\d+') echo "JIRA_ISSUE_KEY=$JIRA_ISSUE_KEY" >> $GITHUB_ENV - name: Create branch for the issue @@ -57,12 +58,6 @@ jobs: git checkout -b "$BRANCH_NAME" git push origin "$BRANCH_NAME" - - name: Add Jira issue key to commit message - env: - JIRA_ISSUE_KEY: ${{ env.JIRA_ISSUE_KEY }} - run: | - echo "JIRA_ISSUE_KEY=${JIRA_ISSUE_KEY}" >> $GITHUB_ENV - update_jira: if: github.event_name == 'push' runs-on: ubuntu-latest