diff --git a/.github/workflows/create-jira-issue.yml b/.github/workflows/create-jira-issue.yml index 2c298665..3ea1c15b 100644 --- a/.github/workflows/create-jira-issue.yml +++ b/.github/workflows/create-jira-issue.yml @@ -9,23 +9,21 @@ jobs: sync_with_jira: runs-on: ubuntu-latest steps: - - name: Setup environment + - name: Sync commits with Jira run: | function extract_issue_key_from_commit_message { echo "$1" | grep -oE 'JIRA-\d+' } - - name: Sync commits with Jira - run: | - JIRA_ISSUE_KEY=$(extract_issue_key_from_commit_message "${{ github.event.head_commit.message }}") + JIRA_ISSUE_KEY=$(extract_issue_key_from_commit_message "Update create-jira-issue.yml") if [ -z "$JIRA_ISSUE_KEY" ]; then echo "No JIRA issue key found in commit message." exit 1 fi - COMMIT_ID="${{ github.event.head_commit.id }}" - COMMIT_MSG="${{ github.event.head_commit.message }}" - + COMMIT_ID="6f2a2640d5fdd55e4fead9548a77940585202111" + COMMIT_MSG="Update create-jira-issue.yml" + curl -u "${{ secrets.JIRA_EMAIL }}:${{ secrets.JIRA_API_TOKEN }}" \ -X POST \ --data "{\"update\": {\"comment\": [{\"add\": {\"body\": \"Commit '$COMMIT_ID' was added to this issue: $COMMIT_MSG\"}}]}}" \