-
Notifications
You must be signed in to change notification settings - Fork 0
ci: Jira 관련 워크플로우 생성 (#29) #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| name: "YAPP-Web-Team-1-FE 이슈 생성" | ||
| description: "YAPP-Web-Team-1-FE Front Repo에 이슈를 생성하며, 생성된 이슈는 Jira와 연동됩니다." | ||
| labels: [order] | ||
| title: "이슈 이름을 작성해주세요" | ||
| body: | ||
| - type: input | ||
| id: parentKey | ||
| attributes: | ||
| label: "🏷️ 상위 작업 (Ticket Number)" | ||
| description: "상위 작업의 Ticket Number를 기입해주세요" | ||
| placeholder: "PRODUCT-00" | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: dropdown | ||
| id: branch | ||
| attributes: | ||
| label: "🧩 브랜치 prefix" | ||
| options: | ||
| - revert | ||
| - refactor | ||
| - perf | ||
| - feature | ||
| - bug | ||
| - ci | ||
| - style | ||
| - docs | ||
| - build | ||
| - chore | ||
| - test | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: details | ||
| attributes: | ||
| label: "🚀 구현 내용" | ||
| description: "이슈에 대해서 자세히 설명해주세요" | ||
| value: | | ||
| - About Details | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: tasks | ||
| attributes: | ||
| label: "✅ 할 일" | ||
| description: "해당 이슈에 대해 필요한 작업목록을 작성해주세요" | ||
| value: | | ||
| - [ ] Task1 | ||
| - [ ] Task2 | ||
| validations: | ||
| required: true | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| name: Close Jira issue | ||
| on: | ||
| issues: | ||
| types: | ||
| - closed | ||
|
|
||
| jobs: | ||
| close-issue: | ||
| name: Close 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 issue key from GitHub issue title | ||
| 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 | ||
Seojunhwan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
Seojunhwan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - name: Close Jira issue | ||
| if: env.JIRA_KEY != '' | ||
| uses: atlassian/gajira-transition@v3 | ||
| with: | ||
| issue: ${{ env.JIRA_KEY }} | ||
| transition: 완료 | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| name: Create Jira issue | ||
| on: | ||
| issues: | ||
| types: | ||
| - opened | ||
| jobs: | ||
| create-issue: | ||
| name: Create Jira issue | ||
| runs-on: ubuntu-latest | ||
Seojunhwan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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-parser@v3 | ||
| id: issue-parser | ||
| with: | ||
| template-path: .github/ISSUE_TEMPLATE/issue-form.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: PRODUCT | ||
| issuetype: 하위 작업 | ||
| summary: "${{ github.event.issue.title }}" | ||
| description: "${{ steps.md2jira.outputs.output-text }}" | ||
| fields: | | ||
| { | ||
| "parent": { | ||
| "key": "${{ steps.issue-parser.outputs.issueparser_parentKey }}" | ||
| } | ||
| } | ||
|
|
||
| - name: Log created issue | ||
| run: echo "Jira Issue ${{ steps.issue-parser.outputs.parentKey }}/${{ steps.create.outputs.issue }} was created" | ||
Seojunhwan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
Seojunhwan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - name: Create branch with Ticket number | ||
| run: | | ||
| ISSUE_NUMBER="${{ steps.create.outputs.issue }}" | ||
| ISSUE_BRANCH="${{ steps.issue-parser.outputs.issueparser_branch }}" | ||
| BRANCH_NAME="$(echo ${ISSUE_BRANCH} | sed 's/ /-/g')/${ISSUE_NUMBER}" | ||
| git checkout -b "${BRANCH_NAME}" | ||
| git push origin "${BRANCH_NAME}" | ||
|
|
||
| - 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 }}" | ||
|
|
||
| - name: Add comment with Jira issue link | ||
| uses: actions-cool/issues-helper@v3 | ||
| with: | ||
| actions: "create-comment" | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| issue-number: ${{ github.event.issue.number }} | ||
| body: "Jira Issue Created: [${{ steps.create.outputs.issue }}](${{ secrets.JIRA_BASE_URL }}/browse/${{ steps.create.outputs.issue }})" | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.