Skip to content

Commit

Permalink
Update create-jira-issue.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongjaino authored Jun 28, 2024
1 parent 1239b28 commit 79e6f9f
Showing 1 changed file with 51 additions and 22 deletions.
73 changes: 51 additions & 22 deletions .github/workflows/create-jira-issue.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,55 @@
name: Create Jira issue
on:
issues:
name: Create Jira issue
on:
issues:
types:
- opened
- reopened

jobs:
create-issue:
name: Create Jira issue
name: Create Jira issue
runs-on: ubuntu-latest
steps:
- name: Jira Login
uses: atlassian/gajira-login@v3
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}

- name: Create Issue
uses: atlassian/gajira-create@v3
with:
project: WAPP
issuetype: Task
summary: '${{ github.event.issue.title }}'
description: '${{ github.event.issue.body }}'

steps:
- name: Login
uses: atlassian/gajira-login@v3
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}

- name: Checkout main code
uses: actions/checkout@v4
with:
ref: main

- name: Issue Parser
uses: stefanbuck/github-issue-praser@v3
id: issue-parser
with:
template-path: .github/ISSUE_TEMPLATE/feature_request.yml

- name: Log Issue Parser
run: |
echo '${{ steps.issue-parser.outputs.jsonString }}'
- name: Convert markdown to Jira Syntax
uses: peter-evans/jira2md@v1
id: md2jira
with:
input-text: |
### Github Issue Link
- ${{ github.event.issue.html_url }}
${{ github.event.issue.body }}
mode: md2jira

- name: Create Issue
id: create
uses: atlassian/gajira-create@v3
with:
project: WAPP
issuetype: Task
summary: "${{ github.event.issue.title }}"
description: "${{ steps.md2jira.outputs.output-text }}"

- name: Log created issue
run: echo "Jira Issue ${{ steps.create.outputs.issue }} was created"

0 comments on commit 79e6f9f

Please sign in to comment.