Skip to content

Conversation

@seoyoon513
Copy link
Contributor

@seoyoon513 seoyoon513 commented Nov 2, 2025

🔗 관련 이슈

📙 작업 설명

  • QA용 이슈 템플릿 추가 (qa label 자동 할당)
  • 기존 Jira 티켓 단위로 GitHub 이슈를 생성하고, 자동으로 해당 티켓과 연동되는 워크플로우(link-existing-jira-issue.yml) 추가

🔎 이슈 생성 방법

STEP1 : QA Task 템플릿 선택

image

STEP2: Jira에 생성된 QA 티켓 번호 입력

기존 fix 템플릿과 크게 다르지 않습니다
image

생성된 이슈 확인

qa 라벨이 자동으로 붙고, Jira 이슈 링크가 코멘트로 생성됩니다
image

기존 형식과 동일하게 브랜치 자동 생성

image image

커밋 메세지 허스키 훅 정상 작동

image

💬 추가 설명 or 리뷰 포인트

  • 전에 논의했던 대로 QA는 Jira에서 등록된 티켓을 기준으로 1:1 대응하는 GitHub 이슈를 생성하도록 설계했습니다~
  • QA 이슈 생성 시, 입력된 Ticket Number(BOOK-XXX)를 기반으로 자동으로 기존 Jira 티켓과 연결됩니다
  • 1차 서비스 고도화 기간에는 해당 정책을 적용해보고 추후 운영 효율이 떨어진다고 판단될 경우 다시 논의해봅시다!

Summary by CodeRabbit

릴리스 노트

  • Chores
    • QA 전용 이슈 템플릿 추가(필수 입력 항목 및 체크리스트 포함)
    • 워크플로우 개선: QA 라벨이 있는 이슈는 기존 Jira 생성 흐름을 건너뛰고, 별도 워크플로우가 Jira 키 추출 시 연동(브랜치 생성/푸시, 이슈 제목 갱신, 코멘트 게시, 작성자 자동 할당 등)을 수행하도록 변경

@coderabbitai
Copy link

coderabbitai bot commented Nov 2, 2025

Walkthrough

QA 이슈 템플릿을 추가하고, qa 레이블일 때 기존 Jira 이슈 생성을 건너는 조건을 create-jira-issue 워크플로우에 추가했으며, qa 레이블이 붙은 이슈에 대해 기존 Jira 티켓을 추출·연동하고 브랜치 생성 및 이슈 업데이트를 수행하는 새로운 워크플로우를 추가했습니다.

Changes

Cohort / File(s) 변경 요약
QA 이슈 템플릿
​.github/ISSUE_TEMPLATE/qa-task.yml
QA 전용 이슈 템플릿 추가: 부모 티켓 키(parentKey, 필수), 설명(description, 필수), 작업 체크리스트(tasks, 필수, textarea), 참고 링크(links, 선택).
Jira 이슈 생성 워크플로우 조건 추가
​.github/workflows/create-jira-issue.yml
create-issue 작업에 if 조건 추가하여 이슈에 qa 레이블이 있는 경우 Jira 이슈 생성 단계를 건너도록 변경(기타 단계와 내용은 동일, 들여쓰기/포맷 조정).
기존 Jira 이슈 연동 워크플로우 추가
​.github/workflows/link-existing-jira-issue.yml
"Link Existing Jira Issue" 워크플로우 추가: 이슈 생성(qa 레이블) 트리거, 제목/본문에서 Jira 키 추출(없으면 정상 종료), Jira 인증, 레포 체크아웃 및 develop 전환, 브랜치 생성·푸시(키 + 이슈 번호), 이슈 제목 업데이트 및 여러 댓글 작성(예: Jira 링크, 브랜치 정보), 작성자 할당 등.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant GitHub as GitHub Issue
    participant LinkWF as Link Workflow
    participant Repo as Repository
    participant Jira as Jira API

    User->>GitHub: qa 레이블로 이슈 생성
    GitHub->>LinkWF: issues:opened 이벤트

    rect rgb(220,240,255)
        Note over LinkWF: 제목/본문에서 Jira 키 추출(정규식)
        LinkWF->>LinkWF: 키 존재 여부 확인
    end

    alt Jira 키 발견
        rect rgb(240,255,240)
            LinkWF->>Repo: 레포 체크아웃 (all branches)
            LinkWF->>Repo: checkout develop
            LinkWF->>Repo: 브랜치 생성 및 push (JIRA-KEY-#NN)
        end
        LinkWF->>GitHub: 이슈 제목에 Jira 키 추가
        LinkWF->>GitHub: 댓글(1) — Jira 링크
        LinkWF->>GitHub: 댓글(2) — 생성된 브랜치 정보
        LinkWF->>GitHub: 댓글(3) — 작성자 할당 안내
    else Jira 키 미발견
        LinkWF->>LinkWF: 정상 종료 (no-op)
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • 추가 검토 필요 사항:
    • link-existing-jira-issue.yml의 정규표현식이 다양한 Jira 키 형식을 적절히 캡처하는지 확인
    • 브랜치 생성/푸시 시 네이밍 충돌 및 예외(이미 존재 등) 처리 검증
    • 워크플로우가 사용하는 권한(scope) 및 시크릿(JIRA 인증 토큰, GITHUB_TOKEN 권한) 설정 점검

Poem

🐰 QA 토끼가 와서 살금살금,
티켓 키를 찾아 깡충깡충,
새 브랜치 뚝딱 만들어 푸시하고,
댓글로 환영 인사 남기며,
자동 연동 축하 춤을 춘다 🌿✨

Pre-merge checks and finishing touches

✅ Passed checks (4 passed)
Check name Status Explanation
Title Check ✅ Passed PR 제목 "chore: QA 이슈 생성 시 기존 Jira 티켓 자동 연동 워크플로우 추가"는 변경 사항의 핵심을 명확하게 요약하고 있습니다. 추가된 link-existing-jira-issue.yml 워크플로우가 기존 Jira 티켓을 자동으로 연동하는 기능을 제공하며, 이는 제목이 나타내는 주요 변경 사항과 일치합니다. 제목은 구체적이고 명확하며, 팀원들이 변경 이력을 스캔할 때 주요 변화를 즉시 이해할 수 있도록 합니다.
Linked Issues Check ✅ Passed 연결된 이슈 #205의 요구 사항은 두 가지입니다: (1) QA 이슈 템플릿 추가 [#205], (2) 기존 Jira 티켓을 자동으로 연동하는 워크플로우 추가 [#205]. 본 PR은 qa-task.yml을 통해 QA 이슈 템플릿을 추가했으며, link-existing-jira-issue.yml 워크플로우로 기존 Jira 티켓 자동 연동을 구현했습니다. 추가로 create-jira-issue.yml에 qa 레이블이 있을 때 Jira 이슈 생성을 스킵하는 가드 조건을 추가하여 중복 생성을 방지했습니다. 이 모든 변경 사항은 연결된 이슈의 요구 사항을 완전히 충족합니다.
Out of Scope Changes Check ✅ Passed PR의 모든 변경 사항은 연결된 이슈 #205의 목표와 범위 내에 있습니다. qa-task.yml은 QA 이슈 템플릿 추가 요구 사항을 충족하고, link-existing-jira-issue.yml은 Jira 티켓 자동 연동 워크플로우 요구 사항을 충족합니다. create-jira-issue.yml 수정은 새로운 QA 워크플로우를 지원하고 중복 Jira 이슈 생성을 방지하기 위한 필수 변경이므로 범위 내 변경입니다.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch BOOK-418-chore/#205

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
.github/ISSUE_TEMPLATE/qa-task.yml (1)

3-3: QA 템플릿의 기본 제목이 "fix]"로 되어 있습니다.

템플릿의 목적이 QA 이슈 보고라면, 기본 제목을 더 일반적인 형태(예: qa] )로 변경하는 것이 좋습니다. 현재 "fix]"는 특정 문제 유형을 암시하며, QA 이슈는 버그 보고뿐만 아니라 다양한 테스트 관련 사항을 포함할 수 있습니다.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5a55210 and 8f8fcbc.

📒 Files selected for processing (3)
  • .github/ISSUE_TEMPLATE/qa-task.yml (1 hunks)
  • .github/workflows/create-jira-issue.yml (1 hunks)
  • .github/workflows/link-existing-jira-issue.yml (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: seoyoon513
Repo: YAPP-Github/Reed-Android PR: 46
File: feature/search/src/main/kotlin/com/ninecraft/booket/feature/search/component/InfiniteLazyColumn.kt:83-95
Timestamp: 2025-07-14T00:46:03.843Z
Learning: seoyoon513과 팀은 한국어 주석을 선호하며, 한국어 주석을 영어로 번역하라는 제안을 하지 않아야 함
🪛 actionlint (1.7.8)
.github/workflows/link-existing-jira-issue.yml

17-17: "github.event.issue.title" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/reference/security/secure-use#good-practices-for-mitigating-script-injection-attacks for more details

(expression)

.github/workflows/create-jira-issue.yml

43-43: "github.event.issue.title" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/reference/security/secure-use#good-practices-for-mitigating-script-injection-attacks for more details

(expression)


112-112: "github.event.issue.title" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/reference/security/secure-use#good-practices-for-mitigating-script-injection-attacks for more details

(expression)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Compose Stability Check
  • GitHub Check: ci-build

Comment on lines +43 to +47
run: |
raw="${{ github.event.issue.title }}"
# Remove prefix like 'feat]', 'fix]', 'chore]', etc.
clean_title=$(echo "$raw" | sed -E 's/^[a-z]+\]\s*//I')
echo "title=$clean_title" >> $GITHUB_OUTPUT
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

GitHub Actions 스크립트 주입 취약점 (Script Injection).

신뢰할 수 없는 입력 값(github.event.issue.title)을 환경 변수로 전달하고 스크립트에서는 환경 변수를 사용하는 것이 권장 사항입니다. 현재 코드에서 ${{ github.event.issue.title }}를 직접 인라인 스크립트에 사용하면 명령어 주입 공격에 취약해집니다.

run: 섹션에서 직접 template 표현식을 사용하지 마시고, 대신 env: 섹션에서 환경 변수로 설정하고 스크립트에서 참조하세요.

Line 43-47 수정 예시:

-            -   name: Clean Issue Title (for Jira Summary)
-                id: clean
-                run: |
-                    raw="${{ github.event.issue.title }}"
+            -   name: Clean Issue Title (for Jira Summary)
+                id: clean
+                env:
+                    RAW_TITLE: ${{ github.event.issue.title }}
+                run: |
+                    raw="$RAW_TITLE"

Line 112-118 수정 예시:

-            -   name: Generate Branch Name
-                id: branch
-                run: |
-                    issue_number=${{ github.event.issue.number }}
-                    issue_title="${{ github.event.issue.title }}"
+            -   name: Generate Branch Name
+                id: branch
+                env:
+                    ISSUE_TITLE: ${{ github.event.issue.title }}
+                run: |
+                    issue_number=${{ github.event.issue.number }}
+                    issue_title="$ISSUE_TITLE"

Also applies to: 112-118

🧰 Tools
🪛 actionlint (1.7.8)

43-43: "github.event.issue.title" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/reference/security/secure-use#good-practices-for-mitigating-script-injection-attacks for more details

(expression)

Comment on lines +15 to +28
- name: Extract Jira Key
id: extract
run: |
title="${{ github.event.issue.title }}"
body="${{ github.event.issue.body }}"
jira_key=$(echo "$title" "$body" | grep -oE '([A-Z]+-[0-9]+)' | head -1)
if [ -z "$jira_key" ]; then
echo "❌ Jira key not found in issue."
echo "jira_key=" >> $GITHUB_OUTPUT
else
echo "✅ Found Jira key: $jira_key"
echo "jira_key=$jira_key" >> $GITHUB_OUTPUT
fi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

GitHub Actions 스크립트 주입 취약점 (Script Injection).

신뢰할 수 없는 입력 값(github.event.issue.titlegithub.event.issue.body)을 환경 변수로 전달하고 스크립트에서는 환경 변수를 사용하는 것이 권장 사항입니다. 현재 코드에서 이들 값을 직접 인라인 스크립트에 사용하면 명령어 주입 공격에 취약해집니다.

run: 섹션에서 직접 template 표현식을 사용하지 마시고, 대신 env: 섹션에서 환경 변수로 설정하세요.

수정 예시:

             -   name: Extract Jira Key
                 id: extract
+                env:
+                    ISSUE_TITLE: ${{ github.event.issue.title }}
+                    ISSUE_BODY: ${{ github.event.issue.body }}
                 run: |
-                    title="${{ github.event.issue.title }}"
-                    body="${{ github.event.issue.body }}"
+                    title="$ISSUE_TITLE"
+                    body="$ISSUE_BODY"
                     jira_key=$(echo "$title" "$body" | grep -oE '([A-Z]+-[0-9]+)' | head -1)
🧰 Tools
🪛 actionlint (1.7.8)

17-17: "github.event.issue.title" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/reference/security/secure-use#good-practices-for-mitigating-script-injection-attacks for more details

(expression)

🤖 Prompt for AI Agents
.github/workflows/link-existing-jira-issue.yml around lines 15 to 28: the
workflow inlines github.event.issue.title and github.event.issue.body directly
into the run script which risks shell/script injection; move those values into
the step's env block (e.g., ISSUE_TITLE and ISSUE_BODY) and reference them
inside the script via safe variable expansion, avoid unquoted expansions, and
use a safe extractor (grep with printf '%s' or parameter expansion) to compute
jira_key; write jira_key to GITHUB_OUTPUT as before.

Copy link
Contributor

@easyhooon easyhooon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
.github/workflows/link-existing-jira-issue.yml (1)

15-28: GitHub Actions 스크립트 주입 취약점 수정 필요 (이전 리뷰에서 지적됨).

신뢰할 수 없는 입력값(github.event.issue.titlegithub.event.issue.body)을 run: 섹션에서 직접 스크립트에 인라인으로 사용하면 명령어 주입 공격에 취약합니다. 이 문제를 해결하기 위해 이들 값을 먼저 env: 섹션에서 환경 변수로 설정한 후 스크립트에서 안전하게 참조해야 합니다.

다음과 같이 수정하세요:

             -   name: Extract Jira Key
                 id: extract
+                env:
+                    ISSUE_TITLE: ${{ github.event.issue.title }}
+                    ISSUE_BODY: ${{ github.event.issue.body }}
                 run: |
-                    title="${{ github.event.issue.title }}"
-                    body="${{ github.event.issue.body }}"
+                    title="$ISSUE_TITLE"
+                    body="$ISSUE_BODY"
                     jira_key=$(echo "$title" "$body" | grep -oE '([A-Z]+-[0-9]+)' | head -1)

                     if [ -z "$jira_key" ]; then
🧹 Nitpick comments (1)
.github/workflows/link-existing-jira-issue.yml (1)

53-59: 브랜치 이름 생성 논리 검토.

브랜치 이름 형식(${jira_key}-fix/#${issue_number})이 명확하고 추적 가능합니다. 다만, 이슈 제목이나 본문에 여러 Jira 키가 포함된 경우 정규표현식이 첫 번째 매칭된 키만 추출하므로 예상과 다를 수 있습니다. 현재 QA 이슈 템플릿이 parentKey 필드를 명시적으로 입력받으므로, 가능하면 그 필드를 우선적으로 사용하는 방식을 고려해볼 수 있습니다.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8f8fcbc and 01625ad.

📒 Files selected for processing (2)
  • .github/ISSUE_TEMPLATE/qa-task.yml (1 hunks)
  • .github/workflows/link-existing-jira-issue.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/ISSUE_TEMPLATE/qa-task.yml
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: seoyoon513
Repo: YAPP-Github/Reed-Android PR: 46
File: feature/search/src/main/kotlin/com/ninecraft/booket/feature/search/component/InfiniteLazyColumn.kt:83-95
Timestamp: 2025-07-14T00:46:03.843Z
Learning: seoyoon513과 팀은 한국어 주석을 선호하며, 한국어 주석을 영어로 번역하라는 제안을 하지 않아야 함
🪛 actionlint (1.7.8)
.github/workflows/link-existing-jira-issue.yml

17-17: "github.event.issue.title" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/reference/security/secure-use#good-practices-for-mitigating-script-injection-attacks for more details

(expression)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: ci-build
  • GitHub Check: Compose Stability Check
🔇 Additional comments (2)
.github/workflows/link-existing-jira-issue.yml (2)

61-66: 브랜치 생성 시 충돌 처리 추가 고려.

새로운 브랜치를 생성하고 푸시하는 로직은 동작하지만, 동일한 이름의 브랜치가 이미 존재하는 경우에 대한 에러 처리가 없습니다. 같은 Jira 티켓에 대해 QA 이슈가 여러 번 생성되는 시나리오에서 워크플로우가 실패할 수 있습니다. 필요에 따라 기존 브랜치 확인 로직을 추가하거나, 에러 처리를 개선하는 것을 고려하세요.


75-98: 이슈 업데이트 및 댓글 로직 승인.

Jira 링크 댓글, 브랜치 생성 알림, 자동 할당 로직이 명확하고 일관성 있게 구현되었습니다. actions-cool/issues-helper 액션을 일관되게 사용하고 있으며, 필요한 정보들을 이슈에 추가하는 흐름이 적절합니다.

Comment on lines +68 to +73
- name: Update GitHub issue title
uses: actions-cool/issues-helper@v3
with:
actions: 'update-issue'
token: ${{ secrets.PAT_TOKEN }}
title: '[${{ steps.extract.outputs.jira_key }}/${{ github.event.issue.title }}'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

GitHub issue 제목 업데이트 형식 오류.

Line 73에서 제목 형식이 불완전합니다. 현재 '[${{ steps.extract.outputs.jira_key }}/${{ github.event.issue.title }}'로 되어 있는데, 닫는 대괄호가 누락되었습니다.

다음과 같이 수정하세요:

             -   name: Update GitHub issue title
                 uses: actions-cool/issues-helper@v3
                 with:
                     actions: 'update-issue'
                     token: ${{ secrets.PAT_TOKEN }}
-                    title: '[${{ steps.extract.outputs.jira_key }}/${{ github.event.issue.title }}'
+                    title: '[${{ steps.extract.outputs.jira_key }}] ${{ github.event.issue.title }}'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Update GitHub issue title
uses: actions-cool/issues-helper@v3
with:
actions: 'update-issue'
token: ${{ secrets.PAT_TOKEN }}
title: '[${{ steps.extract.outputs.jira_key }}/${{ github.event.issue.title }}'
- name: Update GitHub issue title
uses: actions-cool/issues-helper@v3
with:
actions: 'update-issue'
token: ${{ secrets.PAT_TOKEN }}
title: '[${{ steps.extract.outputs.jira_key }}] ${{ github.event.issue.title }}'
🤖 Prompt for AI Agents
.github/workflows/link-existing-jira-issue.yml around lines 68 to 73: the GitHub
issue title string is missing the closing bracket; update the title input to
include the closing square bracket before the final quote so it becomes '[${{
steps.extract.outputs.jira_key }}/${{ github.event.issue.title }}]'.

@seoyoon513 seoyoon513 merged commit b7a90f1 into develop Nov 2, 2025
5 checks passed
@seoyoon513 seoyoon513 deleted the BOOK-418-chore/#205 branch November 2, 2025 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BOOK-418/chore] QA 이슈 생성 시 기존 Jira 티켓 자동 연동 워크플로우 추가

3 participants