-
Notifications
You must be signed in to change notification settings - Fork 0
chore: github actions workflow 개편 #244
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
워크스루GitHub 워크플로우 및 이슈 템플릿이 Jira 통합을 강화하도록 재구성되었습니다. 기존 Jira 이슈 생성 워크플로우가 새로운 QA 라벨을 기반으로 기존 티켓 연동 또는 신규 생성의 두 가지 경로로 분리되었으며, 관련 자동화 단계들이 업데이트되었습니다. 변경 사항
시퀀스 다이어그램sequenceDiagram
participant Issue as GitHub Issue
participant Workflow as Jira Integration
participant Jira as Jira
participant Repo as Repository
Issue->>Workflow: 이슈 생성/라벨 추가
alt 🛠️ qa 라벨 포함
Workflow->>Jira: link-existing-jira 실행
Workflow->>Jira: 이슈 제목에서 Jira 키 추출
Workflow->>Repo: 해당 Jira 키 브랜치 생성/재사용
Workflow->>Issue: Jira 링크 댓글 추가
Workflow->>Issue: 이슈 할당
else 🛠️ qa 라벨 미포함
Workflow->>Workflow: create-new-jira 실행
Workflow->>Jira: 라벨 기반 이슈 유형 결정
Workflow->>Jira: Markdown → Jira 형식 변환
Workflow->>Jira: BOOK 프로젝트에 신규 이슈 생성
Workflow->>Repo: Jira 키 기반 브랜치 생성
Workflow->>Issue: 이슈 제목 업데이트 (Jira 키 포함)
Workflow->>Issue: Jira 링크 댓글 추가
Workflow->>Issue: 이슈 할당
end
예상 코드 검토 난이도🎯 4 (복잡함) | ⏱️ ~60분 특별 검토 필요 영역:
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (3 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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/create-jira-issue.yml (1)
146-190: default.yml 템플릿이 누락되어 있습니다. 필수 수정 필요검증 결과
.github/ISSUE_TEMPLATE/디렉토리에 코드에서 참조하는 모든 템플릿이 존재하지는 않습니다. "other" 타입의 이슈에 대한 폴백으로 설정된default.yml이 누락되어 있습니다. "other" 유형의 이슈가 생성될 경우 이 템플릿을 찾을 수 없어 오류가 발생할 것입니다.해결 방법:
.github/ISSUE_TEMPLATE/default.yml템플릿을 생성하거나- 코드의 폴백 템플릿 경로를 기존 파일(예:
qa-task.yml)로 변경하세요.
🧹 Nitpick comments (1)
.github/workflows/create-jira-issue.yml (1)
90-104: 이슈 제목 확인 단계에서도 환경 변수 사용 필요line 92에서
github.event.issue.title직접 사용 대신 위의 추출 단계에서 정의한 환경 변수를 활용하면 일관성 있게 보안을 강화할 수 있습니다.- name: Check if title needs update id: check_title + env: + ISSUE_TITLE: ${{ github.event.issue.title }} run: | - title="${{ github.event.issue.title }}" + title="$ISSUE_TITLE" jira_key="${{ steps.extract.outputs.jira_key }}"
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
.github/ISSUE_TEMPLATE/qa-task.yml(1 hunks).github/workflows/PR_Label_Assign.yml(1 hunks).github/workflows/close-jira-issue.yml(2 hunks).github/workflows/create-jira-issue.yml(4 hunks).github/workflows/create_release_branch.yaml(0 hunks)
💤 Files with no reviewable changes (1)
- .github/workflows/create_release_branch.yaml
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: doyeonk429
Repo: YAPP-Github/Reed-iOS PR: 157
File: src/Projects/BKPresentation/Sources/MainFlow/Home/View/HomeViewController.swift:19-24
Timestamp: 2025-08-08T01:38:59.656Z
Learning: doyeonk429는 Reed-iOS 프로젝트에서 접근성(accessibility) 관련 개선사항은 현재 작업 중인 PR에서 즉시 처리하지 않고, 접근성 전용 PR이나 이슈를 별도로 만들어 한번에 처리하는 것을 선호한다.
Learnt from: doyeonk429
Repo: YAPP-Github/Reed-iOS PR: 157
File: src/Projects/BKPresentation/Sources/AuthFlow/View/LoginView.swift:43-45
Timestamp: 2025-08-08T01:39:15.620Z
Learning: doyeonk429는 Reed-iOS 프로젝트에서 접근성 개선 작업을 별도의 전용 PR이나 이슈에서 일괄 처리하는 것을 선호한다. 개별 기능 구현 PR에서는 접근성 관련 제안을 하지 않고, 접근성 전담 작업에서 한번에 처리하는 방식을 원한다.
Learnt from: doyeonk429
Repo: YAPP-Github/Reed-iOS PR: 68
File: src/Projects/BKDesign/PreviewApp/Sources/View/BKButtonTestViewController.swift:124-133
Timestamp: 2025-07-10T08:21:49.399Z
Learning: doyeonk429는 테스트 전용으로만 사용되는 extension이나 코드는 해당 테스트 파일에 그대로 두는 것을 선호합니다. 실제 프로덕션 코드에서 사용되지 않는 테스트 전용 코드는 별도 파일로 분리하지 않고 테스트 파일 내에 유지하는 것이 그들의 코드 구성 방식입니다.
Learnt from: doyeonk429
Repo: YAPP-Github/Reed-iOS PR: 138
File: src/Projects/BKDesign/Resources/Assets.xcassets/icons/home.imageset/Contents.json:4-14
Timestamp: 2025-08-04T15:20:43.982Z
Learning: doyeonk429는 Reed-iOS 프로젝트에서 에셋 파일명이 영어가 아닌 경우(한글, 일본어 등)에는 경고를 받고 싶어하지만, 영어 파일명의 네이밍 컨벤션(예: home.png vs home1.png)은 기능적으로 문제없다면 신경쓰지 않는 것을 선호한다.
Learnt from: doyeonk429
Repo: YAPP-Github/Reed-iOS PR: 98
File: src/Projects/BKPresentation/Sources/AuthFlow/View/TermsView.swift:78-85
Timestamp: 2025-07-22T05:37:28.756Z
Learning: doyeonk429는 Reed-iOS 프로젝트에서 더미 데이터나 테스트 데이터의 구체적인 내용(예: URL 주소)에 대해서는 리뷰 시 지적하지 않기를 선호한다. 더미 데이터는 임시적이며 실제 기능 구현 시 교체될 예정이므로 URL의 구체적인 주소는 중요하지 않다고 본다.
🪛 actionlint (1.7.8)
.github/workflows/create-jira-issue.yml
16-16: "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)
92-92: "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). (1)
- GitHub Check: build
🔇 Additional comments (4)
.github/ISSUE_TEMPLATE/qa-task.yml (1)
1-41: ✅ QA Task 이슈 템플릿 구조가 잘 정의되어 있습니다.이슈 템플릿이 필수 항목들(작업 번호, 설명, 수정 목록)과 선택 항목(참고 링크)을 명확하게 정의하고 있으며, 라벨과 한국어 설명이 적절히 포함되어 있습니다.
.github/workflows/PR_Label_Assign.yml (1)
15-57: ✅ PR 라벨 할당 로직이 개선되고 안전합니다.github-script 액션의 v7 업그레이드, 향상된 에러 처리(try/catch), 그리고 명확한 로깅이 포함되어 있습니다. 새로운
qa:라벨 패턴 추가도 QA 이슈 템플릿과 잘 맞춰져 있습니다..github/workflows/create-jira-issue.yml (1)
8-143: ✅ 이중 작업(dual-job) 아키텍처가 명확하고 잘 구조화되어 있습니다.
link-existing-jira와create-new-jira작업이 🛠️ qa 라벨을 기준으로 깔끔하게 분리되어 있으며, 각 작업의 목적이 명확합니다..github/workflows/close-jira-issue.yml (1)
53-108: ✅ Jira 이슈 종료 로직이 견고하고 안전합니다.조건부 실행(
if조건들), 전환 가능성 확인, 그리고 실패 시 명확한 로깅이 포함되어 있습니다. 또한 성공 시 GitHub 코멘트를 추가하여 상태 추적이 용이합니다.
| - 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]+' || true) | ||
| echo "JIRA_KEY=$JIRA_KEY" >> $GITHUB_ENV | ||
| ISSUE_TITLE=$(cat <<'EOF' | ||
| ${{ github.event.issue.title }} | ||
| EOF | ||
| ) | ||
| echo "📋 Issue Title: $ISSUE_TITLE" | ||
| # 대괄호 안의 Jira 키 우선 추출 (예: [BOOK-123] 작업명) | ||
| JIRA_KEY=$(echo "$ISSUE_TITLE" | grep -oP '(?<=\[)[A-Z]+-\d+(?=\])' | head -1) | ||
| # 없으면 일반 패턴으로 추출 | ||
| if [ -z "$JIRA_KEY" ]; then | ||
| JIRA_KEY=$(echo "$ISSUE_TITLE" | grep -oP '\b[A-Z]+-\d+\b' | head -1) | ||
| fi | ||
| if [ -z "$JIRA_KEY" ]; then | ||
| echo "⚠️ No Jira key found in issue title" | ||
| echo "JIRA_KEY=" >> $GITHUB_ENV | ||
| echo "found=false" >> $GITHUB_OUTPUT | ||
| else | ||
| echo "✅ Found Jira key: $JIRA_KEY" | ||
| echo "JIRA_KEY=$JIRA_KEY" >> $GITHUB_ENV | ||
| echo "found=true" >> $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 보안 가이드라인에 따르면, 신뢰할 수 없는 입력값(github.event.issue.title)은 환경 변수를 통해 전달하는 것이 권장됩니다. HERE 문서 방식보다 환경 변수를 사용하면 스크립트 인젝션 위험을 더 효과적으로 완화할 수 있습니다.
- name: Extract Jira issue key from GitHub issue title
id: extract-key
+ env:
+ ISSUE_TITLE: ${{ github.event.issue.title }}
run: |
- ISSUE_TITLE=$(cat <<'EOF'
- ${{ github.event.issue.title }}
- EOF
- )
+ ISSUE_TITLE="${ISSUE_TITLE}"
echo "📋 Issue Title: $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: 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]+' || true) | |
| echo "JIRA_KEY=$JIRA_KEY" >> $GITHUB_ENV | |
| ISSUE_TITLE=$(cat <<'EOF' | |
| ${{ github.event.issue.title }} | |
| EOF | |
| ) | |
| echo "📋 Issue Title: $ISSUE_TITLE" | |
| # 대괄호 안의 Jira 키 우선 추출 (예: [BOOK-123] 작업명) | |
| JIRA_KEY=$(echo "$ISSUE_TITLE" | grep -oP '(?<=\[)[A-Z]+-\d+(?=\])' | head -1) | |
| # 없으면 일반 패턴으로 추출 | |
| if [ -z "$JIRA_KEY" ]; then | |
| JIRA_KEY=$(echo "$ISSUE_TITLE" | grep -oP '\b[A-Z]+-\d+\b' | head -1) | |
| fi | |
| if [ -z "$JIRA_KEY" ]; then | |
| echo "⚠️ No Jira key found in issue title" | |
| echo "JIRA_KEY=" >> $GITHUB_ENV | |
| echo "found=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "✅ Found Jira key: $JIRA_KEY" | |
| echo "JIRA_KEY=$JIRA_KEY" >> $GITHUB_ENV | |
| echo "found=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Extract Jira issue key from GitHub issue title | |
| id: extract-key | |
| env: | |
| ISSUE_TITLE: ${{ github.event.issue.title }} | |
| run: | | |
| ISSUE_TITLE="${ISSUE_TITLE}" | |
| echo "📋 Issue Title: $ISSUE_TITLE" | |
| # 대괄호 안의 Jira 키 우선 추출 (예: [BOOK-123] 작업명) | |
| JIRA_KEY=$(echo "$ISSUE_TITLE" | grep -oP '(?<=\[)[A-Z]+-\d+(?=\])' | head -1) | |
| # 없으면 일반 패턴으로 추출 | |
| if [ -z "$JIRA_KEY" ]; then | |
| JIRA_KEY=$(echo "$ISSUE_TITLE" | grep -oP '\b[A-Z]+-\d+\b' | head -1) | |
| fi | |
| if [ -z "$JIRA_KEY" ]; then | |
| echo "⚠️ No Jira key found in issue title" | |
| echo "JIRA_KEY=" >> $GITHUB_ENV | |
| echo "found=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "✅ Found Jira key: $JIRA_KEY" | |
| echo "JIRA_KEY=$JIRA_KEY" >> $GITHUB_ENV | |
| echo "found=true" >> $GITHUB_OUTPUT | |
| fi | |
🧰 Tools
🪛 actionlint (1.7.8)
21-21: "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)
| run: | | ||
| title=$(cat <<'EOF' | ||
| ${{ github.event.issue.title }} | ||
| EOF | ||
| ) | ||
| body=$(cat <<'EOF' | ||
| ${{ github.event.issue.body }} | ||
| EOF | ||
| ) |
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 보안 가이드라인에 따르면, 신뢰할 수 없는 입력값(github.event.issue.title 등)은 환경 변수를 통해 전달해야 합니다. HERE 문서 방식도 일부 위험을 완화하지만, 환경 변수 접근이 보다 권장됩니다.
- name: Extract Jira Key
id: extract
+ env:
+ ISSUE_TITLE: ${{ github.event.issue.title }}
+ ISSUE_BODY: ${{ github.event.issue.body }}
run: |
- title=$(cat <<'EOF'
- ${{ github.event.issue.title }}
- EOF
- )
- body=$(cat <<'EOF'
- ${{ github.event.issue.body }}
- EOF
- )
+ title="$ISSUE_TITLE"
+ body="$ISSUE_BODY"
# 제목에서 먼저 Jira 키 찾기
jira_key=$(echo "$title" | grep -oP '\b[A-Z]+-\d+\b' | head -1)🧰 Tools
🪛 actionlint (1.7.8)
16-16: "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/create-jira-issue.yml lines 16-24: the workflow currently
injects github.event.issue.title/body directly into a here-doc in the run step
(untrusted input); change the step to pass those values through step environment
variables (e.g., set env: ISSUE_TITLE: ${{ github.event.issue.title }}
ISSUE_BODY: ${{ github.event.issue.body }}) and then reference the env vars
inside the run (use a safe here-doc or printf with the env var) instead of
direct github.event expressions, ensuring values are not expanded from untrusted
input in the shell.
🔗 관련 이슈
📘 작업 유형
📙 작업 내역
🧪 테스트 내역
🎨 스크린샷 또는 시연 영상 (선택)
✅ PR 체크리스트
💬 추가 설명 or 리뷰 포인트 (선택)
Summary by CodeRabbit
릴리스 노트
신기능
개선사항