-
Notifications
You must be signed in to change notification settings - Fork 0
chore: QA 이슈 생성 시 기존 Jira 티켓 자동 연동 워크플로우 추가 #207
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
Conversation
WalkthroughQA 이슈 템플릿을 추가하고, qa 레이블일 때 기존 Jira 이슈 생성을 건너는 조건을 create-jira-issue 워크플로우에 추가했으며, qa 레이블이 붙은 이슈에 대해 기존 Jira 티켓을 추출·연동하고 브랜치 생성 및 이슈 업데이트를 수행하는 새로운 워크플로우를 추가했습니다. Changes
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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this 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
📒 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
| 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
| - 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub Actions 스크립트 주입 취약점 (Script Injection).
신뢰할 수 없는 입력 값(github.event.issue.title과 github.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.
easyhooon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this 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.title과github.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
📒 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액션을 일관되게 사용하고 있으며, 필요한 정보들을 이슈에 추가하는 흐름이 적절합니다.
| - 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 }}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| - 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 }}]'.
🔗 관련 이슈
📙 작업 설명
link-existing-jira-issue.yml) 추가🔎 이슈 생성 방법
STEP1 : QA Task 템플릿 선택
STEP2: Jira에 생성된 QA 티켓 번호 입력
기존 fix 템플릿과 크게 다르지 않습니다

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

기존 형식과 동일하게 브랜치 자동 생성
커밋 메세지 허스키 훅 정상 작동
💬 추가 설명 or 리뷰 포인트
Summary by CodeRabbit
릴리스 노트