[FE][Refactor] 환경 설정 페이지 UI 수정 #118
This file contains hidden or 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 이슈 생성 시 Jira Task 자동 생성 + 에픽/일정 자동 연결 | |
| on: | |
| issues: | |
| types: [opened] | |
| permissions: | |
| issues: write | |
| jobs: | |
| create-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 }} | |
| # 1. 이슈 본문에서 epic/start/due 정보 추출 | |
| - name: Extract Epic/Date Info | |
| id: extract_info | |
| run: | | |
| echo "EPIC_KEY=$(echo '${{ github.event.issue.body }}' | grep -oE 'epic: [A-Z]+-[0-9]+' | awk '{print $2}')" >> $GITHUB_ENV | |
| echo "START_DATE=$(echo '${{ github.event.issue.body }}' | grep -oE 'start: [0-9]{4}-[0-9]{2}-[0-9]{2}' | awk '{print $2}')" >> $GITHUB_ENV | |
| echo "DUE_DATE=$(echo '${{ github.event.issue.body }}' | grep -oE 'due: [0-9]{4}-[0-9]{2}-[0-9]{2}' | awk '{print $2}')" >> $GITHUB_ENV | |
| # 2. Jira 이슈(Task) 생성 - 값 항상 fields에 포함 | |
| - name: Jira 이슈 생성 (에픽/일정 자동 연결) | |
| id: create_jira | |
| uses: atlassian/gajira-create@v3 | |
| with: | |
| project: DP | |
| issuetype: Task | |
| summary: '${{ github.event.issue.title }}' | |
| description: | | |
| GitHub Issue: [${{ github.event.issue.title }}](${{ github.event.issue.html_url }}) | |
| 작성자: ${{ github.event.issue.user.login }} | |
| 본문: | |
| ${{ github.event.issue.body }} | |
| fields: | | |
| { | |
| "customfield_10014": "${{ env.EPIC_KEY }}", | |
| "customfield_10015": "${{ env.START_DATE }}", | |
| "duedate": "${{ env.DUE_DATE }}" | |
| } | |
| # 3. 생성된 Jira 이슈키를 Github 이슈에 코멘트로 기록 (자동 추적) | |
| - name: 생성된 Jira 이슈키를 Github 이슈에 코멘트로 기록 | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: `🔗 **Jira 이슈가 생성되었습니다:** [${{ steps.create_jira.outputs.issue }}](${{ secrets.JIRA_BASE_URL }}/browse/${{ steps.create_jira.outputs.issue }})` | |
| }) |