Skip to content

Commit

Permalink
Merge pull request #15 from DroidsOnRoids/origing/jira-integrations
Browse files Browse the repository at this point in the history
Create Jira workflow
  • Loading branch information
yevoros authored Jul 31, 2024
2 parents 5feff08 + 2cb3716 commit 77d6ce5
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/create_jira_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Create Jira Task from GitHub Issue

on:
issues:
types: [opened]

jobs:
create-jira-task:
runs-on: ubuntu-latest

steps:
- name: Create Jira Task
env:
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
JIRA_USERNAME: yevhenii.oros@droidsonroids.pl
JIRA_URL: https://id.atlassian.com
JIRA_PROJECT_KEY: FT
run: |
ISSUE_TITLE="${{ github.event.issue.title }}"
ISSUE_BODY="${{ github.event.issue.body }}"
JIRA_PAYLOAD=$(cat <<EOF
{
"fields": {
"project": {
"key": "$JIRA_PROJECT_KEY"
},
"summary": "$ISSUE_TITLE",
"description": "$ISSUE_BODY",
"issuetype": {
"name": "Task"
}
}
}
EOF
)
curl -X POST -H "Content-Type: application/json" \
-u $JIRA_USERNAME:$JIRA_API_TOKEN \
--data "$JIRA_PAYLOAD" \
$JIRA_URL/rest/api/2/issue/

0 comments on commit 77d6ce5

Please sign in to comment.