Skip to content

[KAN-20] 메뉴판 API 구현 #8

[KAN-20] 메뉴판 API 구현

[KAN-20] 메뉴판 API 구현 #8

name: Close Jira issue
on:
issues:
types:
- closed
jobs:
close-issue:
name: Close Jira issue
runs-on: ubuntu-latest
steps:
- name: Jira에 로그인한다.
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: Github 이슈에 해당하는 Jira 이슈를 찾는다.
id: extract-key
run: |
ISSUE_TITLE="${{ github.event.issue.title }}"
JIRA_KEY=$(echo "$ISSUE_TITLE" | grep -oE '[A-Z]+-[0-9]+')
echo "JIRA_KEY=$JIRA_KEY" >> $GITHUB_ENV
- name: Jira 이슈를 완료 처리한다.
if: env.JIRA_KEY != ''
uses: atlassian/gajira-transition@v3
with:
issue: ${{ env.JIRA_KEY }}
transition: 완료