Skip to content

New jira integration #6

New jira integration

New jira integration #6

name: Sync issues to jira
on:
issues:
types: [labeled]
jobs:
create-task:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Jira Issue
env:
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
JIRA_BASE_URL: 'https://droidsonroids.atlassian.net'
run: |
ISSUE_SUMMARY="Brief summary of the issue"
ISSUE_DESCRIPTION="Detailed description of the issue"
curl -X POST \
-H "Authorization: Basic $(echo -n $JIRA_API_TOKEN | base64)" \
-H "Content-Type: application/json" \
-d '{
"fields": {
"project": {
"key": "FT"
},
"summary": "'"$ISSUE_SUMMARY"'",
"description": "'"$ISSUE_DESCRIPTION"'",
"issuetype": {
"name": "Task"
}
}
}' \
$JIRA_BASE_URL/rest/api/2/issue/
# jobs:
# issue-sync:
# permissions:
# issues: write # should be set
# runs-on: ubuntu-latest
# steps:
# - name: Sync to Jira
# uses: atsushii/github-issue-to-jira@v1
# with:
# github-owner: DroidsOnRoids
# github-repo: add-to-google-wallet
# github-token: ${{ secrets.GITHUB_TOKEN }}
# jira-hostname: https://droidsonroids.atlassian.net
# jira-auth-token: ${{ secrets.JIRA_API_TOKEN }}
# jira-auth-email: ${{ secrets.JIRA_AUTH_EMAIL }}
# jira-project-key: FT