[Collaboration Tools] Jira์™€ GitHub ์—ฐ๋™ํ•˜๊ธฐ
Collaboration Tools

[Collaboration Tools] Jira์™€ GitHub ์—ฐ๋™ํ•˜๊ธฐ

728x90

๐Ÿ“‘ ๊ฐœ์š”

์ด๋ฒˆ ํ”„๋กœ์ ํŠธ์—์„œ Jira๋ฅผ ์‚ฌ์šฉํ•ด๋ณด๊ธฐ๋กœ ํ–ˆ๋‹ค.

 

GitHub์—์„œ Issue๋ฅผ ์ƒ์„ฑํ–ˆ์„ ๋•Œ, ์ž๋™์œผ๋กœ Jira์—๋„ ์ด์Šˆ๊ฐ€ ์ƒ์„ฑ๋˜๊ณ 

GitHub์—์„œ Issue๋ฅผ close ํ–ˆ์„ ๋•Œ, Jira์˜ ์ด์Šˆ๋„ ์ž๋™์œผ๋กœ ์™„๋ฃŒ ์ƒํƒœ๋กœ ๋ฐ”๋€Œ๊ฒŒ ์ ์šฉํ–ˆ๋‹ค.

 

Jira๋ฅผ ํ†ตํ•ด ๊ฐœ๋ฐœ ์ง„ํ–‰ ์ƒํ™ฉ์„ ์ฒดํฌํ•˜๊ณ ,

๋ฒˆ๋‹ค์šด ์ฐจํŠธ๋ฅผ ํ™œ์šฉํ•˜์—ฌ ์Šคํ”„๋ฆฐํŠธ ํšŒ๊ณ ๊นŒ์ง€ ํ•ด๋ณด๋Š” ๊ฒƒ์ด ๋ชฉํ‘œ์ด๋‹ค.

 

์ด๋ฒˆ ํฌ์ŠคํŒ…์—์„œ๋Š” Jira์™€ GitHub ์—ฐ๋™ ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ์ •๋ฆฌํ•ด๋ณด๊ณ ,

๋‹ค์Œ ํฌ์ŠคํŒ…์—์„œ Jira ๊ฐ„๋‹จ ์‚ฌ์šฉ ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ์ •๋ฆฌํ•ด๋ณด๊ณ ์ž ํ•œ๋‹ค.

 

๐Ÿ“‘ Jira์™€ GitHub ์—ฐ๋™ํ•˜๊ธฐ

์ด ๋ธ”๋กœ๊ทธ๋ฅผ ๋”ฐ๋ผ ํ•ด๋ณด์•˜๊ณ ,

Jira UI๊ฐ€ ๋ฐ”๋€ ๋ถ€๋ถ„์ด ๋งŽ์•„ ๋‚ด ๋ธ”๋กœ๊ทธ์—๋„ ๊ณผ์ •์„ ๋‚จ๊ฒจ๋ณด์•˜๋‹ค.

(์ด ํฌ์ŠคํŒ…์„ ์ฐธ๊ณ ํ•  ๋•Œ, ๋˜ UI๊ฐ€ ๋ฐ”๋€Œ์–ด ์žˆ์„์ง€๋„ ๋ชจ๋ฅด๊ฒ ๋‹ค.)

 

Jira์— ์ ‘์†ํ•˜์—ฌ ์ƒ๋‹จ ์•ฑ → ๋” ๋งŽ์€ ์•ฑ ์‚ดํŽด๋ณด๊ธฐ๋กœ ์ด๋™

 

GitHub for Jira๋ฅผ ๊ฒ€์ƒ‰ํ•˜์—ฌ ํด๋ฆญ

 

๋งŒ์•ฝ ์•„์ง ๋‹ค์šด์ด ์•ˆ๋œ ์ƒํƒœ๋ฉด Try it free ๋‚˜ Get it now ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ ๋‹ค์šด ๋ฐ›์•„์ฃผ๊ณ ,

๋‹ค์šด์ด ์™„๋ฃŒ๋œ ์ƒํƒœ๋ผ๋ฉด Get Started ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ์คŒ

 

๋‚˜๋Š” ์ด๋ฏธ ์—ฐ๊ฒฐ๋œ organization์ด ์žˆ๊ธฐ ๋•Œ๋ฌธ์— organization ๋ชฉ๋ก์ด ๋œจ๋Š”๋ฐ, 

์—ฐ๊ฒฐ๋œ organization์ด ์—†๋‹ค๋ฉด ์—ฐ๊ฒฐํ•˜๋ผ๋Š” ์ฐฝ์ด ๋œฌ๋‹ค.

 

์ถ”๊ฐ€๋กœ organization์„ ์—ฐ๊ฒฐํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด ์ƒ๋‹จ์˜ Connect a GitHub organization ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๋ฉด ๋œ๋‹ค.

 

๊ทธ๋Ÿผ ๋‘˜ ์ค‘์— ์–ด๋Š ๊ฑธ๋กœ ์—ฐ๊ฒฐํ• ์ง€ ์„ ํƒํ•ด์•ผ ํ•œ๋‹ค.

 

์˜ค๋ฅธ์ชฝ์˜ ๋ฌผ์Œํ‘œ์— ๋งˆ์šฐ์Šค๋ฅผ ์˜ฌ๋ ค ๋‘˜์ด ๋ฌด์Šจ ์ฐจ์ด์ธ์ง€ ํ™•์ธํ•ด๋ณด๋‹ˆ

Cloud๋Š” GitHub organization URL์ด http://github.com์œผ๋กœ ์‹œ์ž‘ํ•˜๋Š” ๊ฒฝ์šฐ์— ์„ ํƒํ•˜๊ณ ,

Server๋Š” ์˜จํ”„๋ ˆ๋ฏธ์Šค ๋ฒ„์ „์œผ๋กœ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋Š” ๊ฒฝ์šฐ์— ์„ ํƒํ•˜๋ผ๊ณ  ๋‚˜์™€์žˆ๋‹ค.

 

๋‚˜๋Š” Cloud๋ฅผ ์„ ํƒํ•ด์คฌ๋‹ค.

 

Continue๋ฅผ ๋ˆŒ๋Ÿฌ์ฃผ๊ณ 

 

๋˜ ๋‹ค์‹œ Cloud๋ƒ Server๋ƒ ์„ ํƒํ•˜๋ผ๋Š” ์ฐฝ์ด ๋œฌ๋‹ค.

๋‹ค์‹œ GitHub Cloud๋ฅผ ์„ ํƒ ํ›„ Next๋ฅผ ๋ˆŒ๋Ÿฌ์ค€๋‹ค.

 

Select an organization in GitHub ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ organization์„ ์„ ํƒํ•ด์ฃผ๋Ÿฌ ๊ฐ„๋‹ค.

 

organization ๋ชฉ๋ก ์ค‘ ์—ฐ๊ฒฐํ•˜๊ณ  ์‹ถ์€ organization ์„ ํƒ

 

๋งŒ์•ฝ organization์— ๊ถŒํ•œ์ด ์—†๋‹ค๋ฉด ํ•ด๋‹น ์ž‘์—…์ด ๋ถˆ๊ฐ€๋Šฅํ•˜๋‹ค.

์—ฌ๊ธฐ์„œ ๊ณ„์† ๋ง‰ํžŒ๋‹ค๋ฉด organization ๊ถŒํ•œ์„ ํ™•์ธํ•ด๋ณด์ž.

 

All repositories๋กœ organization์˜ ๋ชจ๋“  repository๋ฅผ ์„ ํƒํ•  ์ˆ˜ ์žˆ๊ณ ,

Only select repositories๋กœ ์ผ๋ถ€ repository๋“ค๋งŒ ์„ ํƒํ•  ์ˆ˜ ์žˆ๋‹ค.

๋‚˜๋Š” ๋‹ค๋ฅธ ํŒ€์˜ repository๋ฅผ ํ•จ๋ถ€๋Ÿฌ ๊ฑด๋“œ๋ฆฌ๋ฉด ์•ˆ๋˜๋‹ˆ Only select repositories๋กœ ์šฐ๋ฆฌ repository๋“ค๋งŒ ์ถ”๊ฐ€ํ•ด์ฃผ์—ˆ๋‹ค.

 

์—ฐ๊ฒฐํ•˜๊ณ  ์‹ถ์€ repository๋ฅผ ์„ ํƒํ–ˆ๋‹ค๋ฉด

Install ํ˜น์€ Request ๋ฒ„ํŠผ ํด๋ฆญ

 

์ด์ œ Jira์˜ ์•ฑ ํƒญ์— GitHub for Jira → Configure์—์„œ ์—ฐ๋™๋œ organization์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

 

๋˜ํ•œ GitHub organization์˜ Settings์—์„œ

Third-party Access → GitHub Apps → Jira configure → Repository access์—์„œ

์—ฐ๋™๋œ repository๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

 

๐Ÿ“‘ Jira ํ”„๋กœ์ ํŠธ ์ƒ์„ฑํ•˜๊ธฐ

์ด์ œ Jira์—์„œ ํ”„๋กœ์ ํŠธ๋ฅผ ๋งŒ๋“ค์–ด๋ณด์ž.

 

์ƒ๋‹จ์˜ ํ”„๋กœ์ ํŠธ → ํ”„๋กœ์ ํŠธ ๋งŒ๋“ค๊ธฐ ์„ ํƒ

 

ํ…œํ”Œ๋ฆฟ ์„ ํƒ์—์„  ์†Œํ”„ํŠธ์›จ์–ด ๊ฐœ๋ฐœ ์Šคํฌ๋Ÿผ์„ ์„ ํƒํ•ด์ฃผ์—ˆ๋‹ค.

 

์ฃผ๋กœ ์นธ๋ฐ˜๊ณผ ์Šคํฌ๋Ÿผ์„ ๋งŽ์ด ์„ ํƒํ•œ๋‹ค๊ณ  ํ•œ๋‹ค.

ํŒ€๋ณ„๋กœ ์–ด๋–ค ํ…œํ”Œ๋ฆฟ์„ ์‚ฌ์šฉํ• ์ง€ ๊ฒฐ์ •ํ•˜๋ฉด ๋  ๊ฒƒ ๊ฐ™๋‹ค.

๊ทธ๋ƒฅ ํ…œํ”Œ๋ฆฟ์ผ ๋ฟ, ์ดํ›„์— ๋‹ค๋ฅธ ๊ธฐ๋Šฅ๋“ค์„ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์œผ๋‹ˆ ์•„๋ฌด๊ฑฐ๋‚˜ ๊ณจ๋ผ๋„ ๋  ๊ฒƒ ๊ฐ™๋‹ค.

 

ํ”„๋กœ์ ํŠธ ์œ ํ˜•์€ ํŒ€์—์„œ ๊ด€๋ฆฌ๋ฅผ ์„ ํƒ

 

์ด๋ฆ„์€ ํ”„๋กœ์ ํŠธ๋ช…์œผ๋กœ ํ•ด์คฌ๋‹ค.

 

ํ‚ค๋Š” ๋‚˜์ค‘์— ํ‹ฐ์ผ“ ๋ฒˆํ˜ธ์— ํ™œ์šฉ๋˜๋Š”๋ฐ,

ํ‚ค๋ฅผ TXPM์œผ๋กœ ์ง€์—ˆ๋‹ค๋ฉด TXPM-001 ์ด๋Ÿฐ ์‹์œผ๋กœ ํ‹ฐ์ผ“ ๋ฒˆํ˜ธ๊ฐ€ ์ƒ์„ฑ๋œ๋‹ค.

 

๋ณดํ†ต ํ”„๋กœ์ ํŠธ๋ช… ์ด๋‹ˆ์…œ๋กœ ํ•œ๋‹ค๊ณ ๋“ค ํ•œ๋‹ค.

๋‚˜๋Š” ํŒ€๋ช…์„ ๋”ฐ์„œ TK๋กœ ํ–ˆ๋‹ค.

 

์—‘์„ธ์Šค๋Š” ์ง„ํ–‰ ์ค‘์œผ๋กœ ์„ ํƒ

 

ํ•ด๋‹น ํ”„๋กœ์ ํŠธ์—์„œ ๊ด€๋ฆฌํ•  repository๋ฅผ ์—ฐ๊ฒฐ

 

์ดํ›„ Jira์—์„œ ์ƒ์„ฑํ•œ ์ด์Šˆ์˜ ํ‹ฐ์ผ“ ๋ฒˆํ˜ธ๋ฅผ ํฌํ•จํ•˜์—ฌ branch๋ฅผ ์ƒ์„ฑํ•˜๊ฑฐ๋‚˜ commit message๋ฅผ ์ž‘์„ฑํ•˜๋ฉด 

Jira์˜ ์ด์Šˆ์— ์—ฐ๊ฒฐ์‹œํ‚ฌ ์ˆ˜ ์žˆ๋‹ค.

 

๐Ÿ“‘ GitHub action์„ ํ†ตํ•ด Issue ์ƒ์„ฑ ์‹œ Jira ์ด์Šˆ ์ž๋™ ์ƒ์„ฑ&์—ฐ๊ฒฐํ•˜๊ธฐ

๋จผ์ €, ํ•ด๋‹น ๊ธฐ๋Šฅ์„ ๊ตฌํ˜„ํ•˜๊ธฐ ์œ„ํ•ด ์ด ๋ธ”๋กœ๊ทธ๋ฅผ ์ฐธ๊ณ ํ–ˆ๋‹ค.

 

๊ฑฐ์˜ ๋™์ผํ•˜๊ฒŒ ๋งŒ๋“ค๋˜, ์šฐ๋ฆฌ ํ”„๋กœ์ ํŠธ์— ์ ์šฉํ•˜๊ธฐ ์œ„ํ•ด ์‚ด์ง์”ฉ ๋ฐ”๊ฟ”์ฃผ์—ˆ๋‹ค.

 

๐Ÿ‘‰ Issue form ๋งŒ๋“ค๊ธฐ

repository ์ƒ๋‹จ์— .github/ISSUE_TEMPLATE/issue_form.yml ๊ฒฝ๋กœ๋กœ yml ํŒŒ์ผ์„ ๋งŒ๋“ค์–ด ์ฃผ์—ˆ๋‹ค.

name: 'WithBeeTravel-BE-Banking ์ด์Šˆ ์ƒ์„ฑ'
description: 'WithBeeTravel-BE-Banking Repo์— ์ด์Šˆ๋ฅผ ์ƒ์„ฑํ•˜๋ฉฐ, ์ƒ์„ฑ๋œ ์ด์Šˆ๋Š” Jira์™€ ์—ฐ๋™๋ฉ๋‹ˆ๋‹ค.'
labels: []
title: '์ด์Šˆ ์ด๋ฆ„์„ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”'
body:
  - type: input
    id: parentKey
    attributes:
      label: '์ƒ์œ„ ์ž‘์—… Ticket Number'
      description: '์ƒ์œ„ ์ž‘์—…์˜ Ticket Number๋ฅผ ๊ธฐ์ž…ํ•ด์ฃผ์„ธ์š”'
      placeholder: 'ex. TK-00'
    validations:
      required: true

  - type: input
    id: description
    attributes:
      label: '์ด์Šˆ ๋‚ด์šฉ(Description)'
      description: '์ด์Šˆ์— ๋Œ€ํ•ด์„œ ๊ฐ„๋žตํžˆ ์„ค๋ช…ํ•ด์ฃผ์„ธ์š”'
    validations:
      required: true

  - type: textarea
    id: details
    attributes:
      label: '์ƒ์„ธ ๋‚ด์šฉ(Details)'
      description: '์ด์Šˆ์— ๋Œ€ํ•ด์„œ ์ž์„ธํžˆ ์„ค๋ช…ํ•ด์ฃผ์„ธ์š”'
      value: |
        - About Details
    validations:
      required: true

  - type: textarea
    id: tasks
    attributes:
      label: '์ฒดํฌ๋ฆฌ์ŠคํŠธ(Tasks)'
      description: 'ํ•ด๋‹น ์ด์Šˆ์— ๋Œ€ํ•ด ํ•„์š”ํ•œ ์ž‘์—…๋ชฉ๋ก์„ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”'
      value: |
        - [ ] Task1
        - [ ] Task2
    validations:
      required: true

  - type: textarea
    id: references
    attributes:
      label: '์ฐธ์กฐ(References)'
      description: 'ํ•ด๋‹น ์ด์Šˆ๊ณผ ๊ด€๋ จ๋œ ๋ ˆํผ๋Ÿฐ์Šค๋ฅผ ์ฐธ์กฐํ•ด์ฃผ์„ธ์š”'
      value: |
        - Reference1
    validations:
      required: false

์œ„ ๋ธ”๋กœ๊ทธ์—์„œ ๊ฐ€์ ธ์˜จ ์ด์Šˆ ํ…œํ”Œ๋ฆฟ์ด๊ณ , ํ•ด๋‹น ๊ฒฝ๋กœ์— ์ด ํŒŒ์ผ์„ ์ €์žฅํ•˜๋ฉด Issue๋ฅผ ๋งŒ๋“ค ๋•Œ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ํ…œํ”Œ๋ฆฟ์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.

 

Get started ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ ์œ„์—์„œ ์ƒ์„ฑํ•œ ์ด์Šˆ ํ…œํ”Œ๋ฆฟ ์‚ฌ์šฉ

 

์œ„ ํ…œํ”Œ๋ฆฟ์€ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๊ตฌ์„ฑ๋˜์–ด ์žˆ๊ณ , ์ฐธ์กฐ๋ฅผ ์ œ์™ธํ•œ ๋ชจ๋“  ๊ฐ’๋“ค์€ ํ•„์ˆ˜ ์ž…๋ ฅ ์‚ฌํ•ญ์ด๋ฏ€๋กœ ๋‹ค ์ž‘์„ฑํ•ด์ฃผ์–ด์•ผ issue๋ฅผ ์ƒ์„ฑํ•  ์ˆ˜ ์žˆ๋‹ค.

 

ํŠนํžˆ, ์ด ๋ฐฉ๋ฒ•์„ ๋”ฐ๋ผ GitHub Issue๋ฅผ ๋งŒ๋“ค๋ฉด Jira์˜ ์ด์Šˆ๋ฅผ Subtask๋กœ ์ƒ์„ฑํ•œ๋‹ค.

์ฆ‰, Jira์˜ Story ํ˜น์€ Task ์ƒ์œ„ ์ž‘์—… ๋ฐ‘์˜ Subtask๋กœ ์ด์Šˆ๊ฐ€ ๋งŒ๋“ค์–ด์ง€๊ธฐ ๋•Œ๋ฌธ์—

์ƒ์œ„ ์ž‘์—…์— ํ•ด๋‹นํ•˜๋Š” Story ํ˜น์€ Task์˜ ํ‹ฐ์ผ“ ๋„˜๋ฒ„๋ฅผ ์ ์–ด์ฃผ์–ด์•ผ ํ•œ๋‹ค.

(Story, Task, Subtask์— ๋Œ€ํ•œ ๋‚ด์šฉ์€ ๋‹ค์Œ ํฌ์ŠคํŒ…์—์„œ ๋‹ค๋ค„๋ณด๋ ค๊ณ  ํ•œ๋‹ค.)

 

๐Ÿ‘‰ GitHub action ํŒŒ์ผ ๋งŒ๋“ค๊ธฐ

์ด์ œ ์‹ค์งˆ์ ์œผ๋กœ GitHub Issue๋ฅผ ์ƒ์„ฑํ–ˆ์„ ๋•Œ

์ด ์ด๋ฒคํŠธ๋ฅผ ๊ฐ์ง€ํ•˜๊ณ  ์ž๋™์œผ๋กœ Jira์— ์ด์Šˆ๋ฅผ ์ƒ์„ฑํ•ด์ฃผ๋Š” action ํŒŒ์ผ์„ ๋งŒ๋“ค๊ฒ ๋‹ค.

 

.github/workflows/create-jira-issue.yml ๊ฒฝ๋กœ๋กœ yml ํŒŒ์ผ์„ ๋งŒ๋“ค์–ด์ฃผ์—ˆ๋‹ค.

ํ•ด๋‹น ํŒŒ์ผ๋„ ๋ธ”๋กœ๊ทธ์˜ ์ฝ”๋“œ๋ฅผ ๊ฑฐ์˜ ๋™์ผํ•˜๊ฒŒ ์ž‘์„ฑํ•˜๋˜, ์šฐ๋ฆฌ ํ”„๋กœ์ ํŠธ ์ƒํ™ฉ์— ๋งž๊ฒŒ ์‚ด์ง์”ฉ ์ˆ˜์ •ํ–ˆ๋‹ค.

 

์ฝ”๋“œ์— ๋Œ€ํ•œ ์ž์„ธํ•œ ์„ค๋ช…์€ ๋ธ”๋กœ๊ทธ์— ์•„์ฃผ ์ž˜ ์„ค๋ช…๋˜์–ด ์žˆ์œผ๋‹ˆ ๋ธ”๋กœ๊ทธ๋ฅผ ์ฐธ๊ณ ํ•˜๋Š” ๊ฒƒ์ด ์ข‹์„ ๊ฒƒ ๊ฐ™๊ณ ,

๋ธ”๋กœ๊ทธ๋งŒ์œผ๋กœ๋„ ์„ค๋ช…์ด ๋ถ€์กฑํ•œ ๋ถ€๋ถ„์ด ์žˆ๋Š” ๊ฒƒ ๊ฐ™๋‹ค๋ฉด GPT์—๊ฒŒ ์ฝ”๋“œ๋ฅผ ์„ค๋ช…ํ•ด๋‹ฌ๋ผ๊ณ  ํ•˜๋Š” ๊ฒƒ๋„ ์ข‹์€ ๋ฐฉ๋ฒ•์ธ ๊ฒƒ ๊ฐ™๋‹ค.

name: Create Jira issue
on:
  issues:
    types:
      - opened
jobs:
  create-issue:
    name: Create Jira issue
    runs-on: ubuntu-latest
    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-praser@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: TK
          issuetype: Subtask
          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"

      - name: Checkout develop code
        uses: actions/checkout@v4
        with:
          ref: dev

      - name: Create branch with Ticket number
        run: |
          # GitHub ์ด์Šˆ ์ œ๋ชฉ์—์„œ ํŠน์ˆ˜ ๋ฌธ์ž ์ œ๊ฑฐ ๋ฐ ๊ณต๋ฐฑ์„ ํ•˜์ดํ”ˆ์œผ๋กœ ๋ณ€๊ฒฝ
          CLEANED_TITLE=$(echo "${{ github.event.issue.title }}" | LC_CTYPE=C sed 's/[^a-zA-Z0-9๊ฐ€-ํžฃ ]//g' | sed 's/ /-/g')
          BRANCH_NAME="feat/${{ steps.create.outputs.issue }}-${CLEANED_TITLE}"
          
          # ๋ธŒ๋žœ์น˜ ์ƒ์„ฑ ๋ฐ push
          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: Create Issue
        id: create
        uses: atlassian/gajira-create@v3
        with:
          project: TK
          issuetype: Subtask
          summary: "${{ github.event.issue.title }}"
          description: "${{ steps.md2jira.outputs.output-text }}"
          fields: |
            {
              "parent": {
                "key": "${{ steps.issue-parser.outputs.issueparser_parentKey }}"
              }
            }

with.project์—๋Š” ๋‚˜์˜ Jira ํ”„๋กœ์ ํŠธ์—์„œ ์‚ฌ์šฉํ•˜๋Š” ํ‚ค๋ฅผ ์ ์–ด์ฃผ์—ˆ๊ณ ,

Jira์— ์ž๋™์œผ๋กœ ์ƒ์„ฑํ•  ์ด์Šˆ ํƒ€์ž…์€ with.issutype์œผ๋กœ ๋ฐ”๊ฟ”์ฃผ๋ฉด ๋œ๋‹ค.

 

๋งŒ์•ฝ ์ด ๋ถ€๋ถ„์—์„œ ์ž๊พธ action์ด ์‹คํŒจํ•œ๋‹ค๋ฉด with.project์™€ with.issuetype์„ ํ™•์ธํ•ด์ฃผ์ž.

 

๋‚˜์˜ ๊ฒฝ์šฐ Jira์—์„œ ์ด์Šˆ ํƒ€์ž…์ด ์˜์–ด๋กœ Subtask๊ฐ€ ์•„๋‹ˆ๋ผ ํ•œ๊ธ€๋กœ ์ ํ˜€์žˆ์–ด์„œ ์—๋Ÿฌ๊ฐ€ ๋‚ฌ์—ˆ๋‹ค.

Jira์—์„œ ์ด์Šˆ ํƒ€์ž…๋ช…์„ Subtask๋กœ ๋ฐ”๊ฟ”์ฃผ๋‹ˆ ์ž˜ ๋Œ์•„๊ฐ”๋‹ค.

 

      - name: Checkout develop code
        uses: actions/checkout@v4
        with:
          ref: dev

๋‹ค์Œ์œผ๋กœ ๋ณ€๊ฒฝํ•ด์ค€ ๋ถ€๋ถ„์€with.ref์ด๋‹ค.

 

์šฐ๋ฆฌ ํŒ€์€ ๊ฐœ๋ฐœ ๋ธŒ๋žœ์น˜ ๋ช…์„ develop์ด ์•„๋‹Œ dev๋กœ ๋งŒ๋“ค์–ด์ฃผ์—ˆ๊ธฐ ๋•Œ๋ฌธ์—,

with.ref๋ฅผ dev๋กœ ์ˆ˜์ •ํ•ด์ฃผ์—ˆ๋‹ค.

 

      - name: Create branch with Ticket number
        run: |
          # GitHub ์ด์Šˆ ์ œ๋ชฉ์—์„œ ํŠน์ˆ˜ ๋ฌธ์ž ์ œ๊ฑฐ ๋ฐ ๊ณต๋ฐฑ์„ ํ•˜์ดํ”ˆ์œผ๋กœ ๋ณ€๊ฒฝ
          CLEANED_TITLE=$(echo "${{ github.event.issue.title }}" | LC_CTYPE=C sed 's/[^a-zA-Z0-9๊ฐ€-ํžฃ ]//g' | sed 's/ /-/g')
          BRANCH_NAME="feat/${{ steps.create.outputs.issue }}-${CLEANED_TITLE}"
          
          # ๋ธŒ๋žœ์น˜ ์ƒ์„ฑ ๋ฐ push
          git checkout -b "$BRANCH_NAME"
          git push origin "$BRANCH_NAME"

๋‹ค์Œ์œผ๋กœ ์ˆ˜์ •ํ•ด์ค€ ๋ถ€๋ถ„์ด๋‹ค.

 

ํ•ด๋‹น ์ฝ”๋“œ๋Š” Jira์—์„œ ์ƒ์„ฑ๋œ ์ด์Šˆ์˜ ํ‹ฐ์ผ“ ๋„˜๋ฒ„๋ฅผ ๋ธŒ๋žœ์น˜๋ช…์œผ๋กœ ์‚ฌ์šฉํ•ด์„œ ๋ธŒ๋žœ์น˜๋ฅผ ์ƒ์„ฑํ•ด์ฃผ๋Š” ๋ถ€๋ถ„์ธ๋ฐ,

ํ‹ฐ์ผ“ ๋„˜๋ฒ„๋กœ๋งŒ ๋ธŒ๋žœ์น˜๋ช…์ด ๋งŒ๋“ค์–ด์ ธ ๋ธŒ๋žœ์น˜๋“ค์„ ๊ตฌ๋ถ„ํ•˜๊ธฐ ์–ด๋ ต๋‹ค๋Š” ํŒ€์›์˜ ์˜๊ฒฌ์„ ์ˆ˜๋ ดํ•˜์—ฌ

{ํ‹ฐ์ผ“ ๋„˜๋ฒ„}-{์ด์Šˆ ํƒ€์ดํ‹€}๋กœ ๋ธŒ๋žœ์น˜๋ช…์„ ๋งŒ๋“ค๋„๋ก ์ˆ˜์ •ํ•˜์˜€๋‹ค.

 

๋ธŒ๋žœ์น˜๋ช…์€ ํŠน์ˆ˜๋ฌธ์ž์™€ ๊ณต๋ฐฑ์„ ํฌํ•จํ•  ์ˆ˜ ์—†๊ธฐ ๋•Œ๋ฌธ์—

์ด์Šˆ ํƒ€์ดํ‹€์— ํฌํ•จ๋œ ํŠน์ˆ˜๋ฌธ์ž๋ฅผ ์ œ๊ฑฐํ•˜๊ณ  ๊ณต๋ฐฑ์€ ํ•˜์ดํ”ˆ(-)์œผ๋กœ ๋ฐ”๊ฟ” ์ƒ์„ฑํ•˜์˜€๋‹ค.

 

ํ•ด๋‹น ๋ฐฉ๋ฒ•์„ ์ ์šฉํ•˜๋ฉด

์ด์Šˆ ํƒ€์ดํ‹€์„ ๋„ˆ๋ฌด ๊ธธ๊ฒŒ ์ ์„ ๊ฒฝ์šฐ ๋ธŒ๋žœ์น˜๋ฅผ ๋ณ€๊ฒฝํ•  ๋•Œ ๋ฒˆ๊ฑฐ๋กœ์šธ ์ˆ˜ ์žˆ์œผ๋‹ˆ,

๋˜๋„๋ก์ด๋ฉด ์ด์Šˆ ํƒ€์ดํ‹€์„ ๊ฐ„๊ฒฐํ•˜๊ฒŒ ์ ๋Š”๊ฒŒ ์ข‹์„ ๊ฒƒ ๊ฐ™๋‹ค.

 

๐Ÿ‘‰ GitHub secret key ์„ค์ •

์œ„์˜ action ํŒŒ์ผ์—์„œ JIRA_API_TOKEN, JIRA_BASE_URL, JIRA_USER_EMAIL secret key๊ฐ€ ํ•„์š”ํ•˜๋‹ค.

 

 

์ด secret key๋Š” GitHub Repository → Settings → Secrets and variables → Actions → Repository secrets์—์„œ

New repository secret ๋ฒ„ํŠผ์„ ํ†ตํ•ด ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ๋‹ค.

 

JIRA_API_TOKEN: ์—ฌ๊ธฐ์„œ API ํ† ํฐ์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋‹ค.

JIRA_BASE_URL: Jira ํ”„๋กœ์ ํŠธ ์ฃผ์†Œ https://<yourdomain>/atlassian.net

JIRA_USER_EMAIL: Jira์— ๋“ฑ๋ก๋œ email

 

๐Ÿ‘‰ GitHub Issue ์ƒ์„ฑ

์ด์ œ Jira์—์„œ ์ƒ์œ„ ์ž‘์—…์ธ Story๋‚˜ Task๋ฅผ ์ƒ์„ฑํ•œ ํ›„,

GitHub Issue๋ฅผ ์ƒ์„ฑํ•  ๋•Œ ์ƒ์œ„ ์ž‘์—…์˜ ํ‹ฐ์ผ“ ๋„˜๋ฒ„๋ฅผ ์ž‘์„ฑํ•ด์ฃผ๋ฉด

์ƒ์œ„ ์ž‘์—…์˜ ํ•˜์œ„ ์ž‘์—…์œผ๋กœ Jira ์ด์Šˆ๊ฐ€ ์ž๋™ ์ƒ์„ฑ๋˜๊ณ 

์ด๋ ‡๊ฒŒ ์ƒ์„ฑ๋œ ์ด์Šˆ์˜ ํ‹ฐ์ผ“ ๋„˜๋ฒ„๊ฐ€ GitHub Issue์˜ ํƒ€์ดํ‹€ ์•ž์— ์ž๋™์œผ๋กœ ์ถ”๊ฐ€๋˜์–ด ์ƒ์„ฑ๋œ๋‹ค!

 

๋˜ํ•œ ์ƒ์„ฑ๋œ ์ด์Šˆ์˜ ํ‹ฐ์ผ“๋„˜๋ฒ„์™€ ์ด์Šˆ ํƒ€์ดํ‹€์„ ์ด๋ฆ„์œผ๋กœ ๋ธŒ๋žœ์น˜๋„ ์ƒ์„ฑ๋˜๋ฏ€๋กœ,

ํ•ด๋‹น ๋ธŒ๋žœ์น˜์—์„œ ๊ฐœ๋ฐœ์„ ์ง„ํ–‰ํ•˜๋ฉด ๋œ๋‹ค~

 

๐Ÿ“‘ GitHub action์„ ํ†ตํ•ด Issue close ์‹œ Jira ์ด์Šˆ ์ž๋™ ์™„๋ฃŒ ์ƒํƒœ ๋ณ€๊ฒฝํ•˜๊ธฐ

๊ทธ๋ ‡๋‹ค๋ฉด ์œ„์—์„œ ์ƒ์„ฑํ•œ GitHub Issue์— ๋Œ€ํ•œ ๊ฐœ๋ฐœ์ด ๋งˆ๋ฌด๋ฆฌ๋˜์–ด Issue๋ฅผ closeํ•˜๋ฉด

์—ฐ๊ฒฐ๋œ Jira์˜ ์ด์Šˆ๋„ ์ž๋™์œผ๋กœ ์™„๋ฃŒ ์ƒํƒœ๋กœ ๋ณ€๊ฒฝ๋˜๋„๋ก ํ•ด๋ณด์ž!

 

์ด๋ฒˆ์—๋Š” ์ด ๋ธ”๋กœ๊ทธ๋ฅผ ์ฐธ๊ณ ํ–ˆ๊ณ , ์šฐ๋ฆฌ ํ”„๋กœ์ ํŠธ ์ƒํ™ฉ์— ๋งž๊ฒŒ ํŒŒ์ผ์„ ์ˆ˜์ •ํ•ด์ฃผ์—ˆ๋‹ค.

 

๐Ÿ‘‰ GitHub Action ํŒŒ์ผ ๋งŒ๋“ค๊ธฐ

.github/workflows/close-jira-issue.yml ๊ฒฝ๋กœ๋กœ yml ํŒŒ์ผ์„ ๋งŒ๋“ค์–ด์ฃผ์—ˆ๋‹ค.

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
      
      - name: Transition Jira Issue to Done
        if: env.JIRA_KEY != ''
        uses: atlassian/gajira-transition@v3
        with:
          issue: ${{ env.JIRA_KEY }}
          transition: ์™„๋ฃŒ

      - name: Log completed transition
        run: echo "Jira Issue ${{ steps.issue-parser.outputs.issueparser_parentKey }} was transitioned to Done."

 

์ด๋ฒˆ์— ๋ณ€๊ฒฝํ•œ ๋ถ€๋ถ„์€ ์ด ๋ถ€๋ถ„์ด๋‹ค.

      - name: Transition Jira Issue to Done
        if: env.JIRA_KEY != ''
        uses: atlassian/gajira-transition@v3
        with:
          issue: ${{ env.JIRA_KEY }}
          transition: ์™„๋ฃŒ

์ด ๋ถ€๋ถ„์—์„œ ์ž๊พธ action์ด ์‹คํŒจํ–ˆ๋‹ค.

 

๋‚˜์˜ Jira ํ”„๋กœ์ ํŠธ์—์„œ๋Š” ์ด์Šˆ ์ƒํƒœ๊ฐ€ ์˜์–ด๋กœ Done์ด ์•„๋‹ˆ๋ผ ์™„๋ฃŒ๋กœ ๋˜์–ด์žˆ๋Š” ๊ฒƒ ๊ฐ™๋‹ค.

Jira flow?์—์„œ ๋ดค์„ ๋•Œ๋Š” Done์ด๋ผ๊ณ  ์„ค์ •๋˜์–ด ์žˆ์–ด์„œ ์–ด๋””๊ฐ€ ์ž˜๋ชป ๋๋Š”์ง€ ํ•œ์ฐธ ์ฐพ๋‹ค๊ฐ€

action ํŒŒ์ผ์— with.transition์„ ์™„๋ฃŒ๋กœ ๋ฐ”๊ฟ”๋ณด์•˜๋”๋‹ˆ ์„ฑ๊ณตํ–ˆ๋‹ค.

 

์ด๊ฑด ์ด์Šˆ ์ƒํƒœ๋Š” ์–ด๋””์—์„œ ๋ฐ”๊พธ๋Š”์ง€ ๋ชฐ๋ผ action ํŒŒ์ผ์„ ๋ฐ”๊ฟ”๋ฒ„๋ ธ๋‹ค.

 

๐Ÿ‘‰ GitHub Issue close ํ•˜๊ธฐ

์ด์ œ, PR message์— closeํ•  Issue ๋ฒˆํ˜ธ๋ฅผ ์ ์–ด์ฃผ๊ณ ,

ํ•ด๋‹น PR์„ Mergeํ•  ๋•Œ ์ž๋™์„ Issue๊ฐ€ close๋˜๋ฉฐ

Jira์˜ ์ด์Šˆ๋„ ์™„๋ฃŒ ์ƒํƒœ๋กœ ๋ฐ”๋€” ์ˆ˜ ์žˆ๊ฒŒ ๋๋‹ค!!

728x90