Skip to content

Commit

Permalink
add issue type in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
yevoros committed Jul 31, 2024
1 parent 5c0f693 commit 26ecdc9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/create_jira_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ jobs:
run: |
ISSUE_TITLE="${{ github.event.issue.title }}"
ISSUE_BODY="${{ github.event.issue.body }}"
ISSUE_TYPE="Task"
if echo "${{ github.event.issue.labels.*.name }}" | grep -q "bug"; then
ISSUE_TYPE="Bug"
elif echo "${{ github.event.issue.labels.*.name }}" | grep -q "feature"; then
ISSUE_TYPE="Story"
fi
curl -X POST \
-u "${JIRA_AUTH_EMAIL}:${JIRA_API_TOKEN}" \
Expand All @@ -28,7 +35,8 @@ jobs:
},
"summary": "$ISSUE_TITLE",
"description": "$ISSUE_BODY",
"name": "Task"
"issuetype": {
"name": "$ISSUE_TYPE"
}
}
}' \
Expand Down

0 comments on commit 26ecdc9

Please sign in to comment.