Feat: 로그인, 회원가입 UI 퍼블리싱 #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sync Jira on Issue Close | |
on: | |
issues: | |
types: [closed] | |
permissions: | |
issues: read | |
jobs: | |
sync-jira: | |
name: Sync Jira Issue | |
runs-on: ubuntu-latest | |
steps: | |
- name: Login to 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: Extract Jira Key | |
id: extract | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
const body = context.payload.issue.body; | |
const match = body.match(/🔑 Jira Issue: ([A-Z]+-[0-9]+)/); | |
if (match) { | |
return match[1]; | |
} | |
return ''; | |
result-encoding: string | |
- name: Transition Jira Issue | |
if: steps.extract.outputs.result != '' | |
uses: atlassian/gajira-transition@v3 | |
with: | |
issue: ${{ steps.extract.outputs.result }} | |
transition: "완료" | |
- name: Comment on Jira Issue | |
if: steps.extract.outputs.result != '' | |
uses: atlassian/gajira-comment@v3 | |
with: | |
issue: ${{ steps.extract.outputs.result }} | |
comment: "Issue Closed: ${{ github.event.issue.html_url }}" | |
- name: Log if no Jira issue found | |
if: steps.extract.outputs.result == '' | |
run: echo "No Jira issue key found in GitHub issue body" |