[BVVER24-149] Mypage νλ‘ν μμ - λλ€μ λ³κ²½ #56
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: Github with jira | |
on: | |
issues: | |
types: [opened] | |
jobs: | |
jira-login: | |
name: Jira Login | |
runs-on: ubuntu-latest | |
steps: | |
# githut secret νμ± -> github.actor μμ±μμ λ§κ² λ³ν | |
- name: Secrets Parsing | |
id: secret | |
run: | | |
echo "JIRA_API_TOKEN=JIRA_API_TOKEN_${{ github.actor }}" >> $GITHUB_OUTPUT | |
echo "JIRA_USER_EMAIL=JIRA_USER_EMAIL_${{ github.actor }}" >> $GITHUB_OUTPUT | |
# Jira Login | |
- name: Login | |
uses: atlassian/gajira-login@v3 | |
env: | |
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} | |
JIRA_API_TOKEN: ${{ secrets[steps.secret.outputs.JIRA_API_TOKEN] }} | |
JIRA_USER_EMAIL: ${{ secrets[steps.secret.outputs.JIRA_USER_EMAIL] }} | |
# refμ λΈλμΉλ‘ μ΄λ | |
- name: Checkout develop code | |
uses: actions/checkout@v4 | |
with: | |
ref: develop | |
# μμ±ν μ΄μ νμ± | |
- name: Issue Parser | |
uses: stefanbuck/github-issue-praser@v3 | |
id: issue-parser | |
with: | |
template-path: .github/ISSUE_TEMPLATE/github_with_jira_issue.yml | |
# μμ±ν μ΄μ νμ± λ‘κ·Έ | |
- name: Log Issue Parser | |
run: echo '${{ steps.issue-parser.outputs.jsonString }}' | |
# λ§ν¬λ€μ΄ -> Jira λ³κ²½ | |
- name: Convert markdown to Jira Syntax | |
uses: peter-evans/jira2md@v1 | |
id: md2jira | |
with: | |
input-text: | | |
## Summary | |
${{ steps.issue-parser.outputs.issueparser_description }} | |
## Description | |
${{ steps.issue-parser.outputs.issueparser_details }} | |
## Reference | |
${{ steps.issue-parser.outputs.issueparser_references }} | |
## Github Issue Link | |
${{ github.event.issue.html_url }} | |
mode: md2jira | |
# Jira μ΄μ μμ± [ννΈ] μ΄μ νμ΄ν | |
- name: Create Issue | |
id: create | |
uses: atlassian/gajira-create@v3 | |
with: | |
project: BVVER24 | |
issuetype: κ°λ° | |
summary: "[Android] ${{ github.event.issue.title }}" | |
description: "${{ steps.md2jira.outputs.output-text }}" | |
fields: | | |
{ | |
"parent": { | |
"key": "BVVER24-${{ steps.issue-parser.outputs.issueparser_parent }}" | |
} | |
} | |
# Jira μ΄μ μμ± λ‘κ·Έ | |
- name: Log created issue | |
run: echo "Issue ${{ steps.create.outputs.issue }} was created" | |
# Jira μ΄μ μμ±μ λ‘κ·Έ | |
- name: Log created issue | |
run: echo "Issue ${{ github.actor }} was created" | |
# Github μ΄μ νμ΄ν μμ "[μ΄μλ²νΈ] μ΄μνμ΄ν" | |
- name: Update issue title | |
uses: actions-cool/issues-helper@v3 | |
with: | |
actions: "update-issue" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
title: "[${{ steps.create.outputs.issue }}] ${{ github.event.issue.title }}" | |
# Github μ΄μ μκΈ° μμ Assignnes λ±λ‘ | |
- name: Add assigness | |
uses: actions-cool/issues-helper@v3 | |
with: | |
actions: 'add-assignees' | |
uses: actions-cool/issues-helper@v3 | |
token: ${{ secrets.GITHUB_TOKEN }} | |
issue-number: ${{ github.event.issue.number }} | |
assignees: '${{ github.actor }}' | |
# λΈλμΉ μμ± -> "λΈλμΉνμ "/"μ§λΌ μ΄μλ²νΈ"-"λΈλμΉ μ΄λ¦" | |
- name: Create branch with Ticket number | |
run: | | |
git checkout -b ${{ steps.issue-parser.outputs.issueparser_branchType }}/${{ steps.create.outputs.issue }}-${{ steps.issue-parser.outputs.issueparser_branchName }} | |
git push origin ${{ steps.issue-parser.outputs.issueparser_branchType }}/${{ steps.create.outputs.issue }}-${{ steps.issue-parser.outputs.issueparser_branchName }} |