chore: PR 라벨링 워크플로우 github-script로 전환#11
Conversation
WalkthroughPR 라벨링 자동화 방식이 Changes
Sequence Diagram(s)sequenceDiagram
participant GitHub
participant Workflow (github-script)
participant PR
GitHub->>Workflow (github-script): PR 오픈/수정 이벤트 트리거
Workflow (github-script)->>PR: PR 제목 추출
Workflow (github-script)->>Workflow (github-script): 정규식 기반 라벨 매칭
alt 매칭되는 라벨 있음
Workflow (github-script)->>GitHub: PR에 라벨 추가 API 호출
else 매칭되는 라벨 없음
Workflow (github-script)->>Workflow (github-script): 라벨 없음 로그 출력
end
Assessment against linked issues
Assessment against linked issues: Out-of-scope changes해당 변경사항 내에서 이슈 요구사항과 무관한 변경은 발견되지 않았습니다. Poem
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
.github/workflows/PR_Label_Assign.yml (2)
22-29: Conventional Commit scope 지원 제안
현재feat:,fix:등 단순 prefix만 매칭하므로feat(scope):형식의 커밋 메시지는 라벨이 적용되지 않습니다. 다음과 같이 정규식을 확장해보세요.- { pattern: /^feat:/i, label: '✨ feat' }, + { pattern: /^feat(?:\([^)]*\))?:/i, label: '✨ feat' },
31-45: 기존 라벨 제거 로직 추가 권장
addLabels만 사용할 경우 PR 제목 수정 시 이전 라벨이 남아 있을 수 있습니다.addLabels대신setLabels를 사용해 전체 라벨을 덮어쓰도록 변경하는 것을 제안드립니다.- if (labelsToAdd.length > 0) { - await github.rest.issues.addLabels({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - labels: labelsToAdd - }); - core.info(`Added labels: ${labelsToAdd.join(', ')}`); - } else { - core.info('No matching labels found for PR title.'); - } + await github.rest.issues.setLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: labelsToAdd + }); + core.info(`Updated labels to: ${labelsToAdd.join(', ')}`);
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/labeler.yml(0 hunks).github/workflows/PR_Label_Assign.yml(1 hunks)
💤 Files with no reviewable changes (1)
- .github/labeler.yml
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/PR_Label_Assign.yml
17-17: the runner of "actions/github-script@v6" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: ci-build
🔇 Additional comments (2)
.github/workflows/PR_Label_Assign.yml (2)
11-13: 최소 권한 설정으로 보안 강화
컨텐츠 읽기(contents: read)와 PR 쓰기(pull-requests: write) 권한만 부여해 권한을 최소화한 점이 좋습니다.
16-17: actions/github-script 버전
static 분석 툴에서 구 버전 경고가 떴지만actions/github-script@v6은 현재 최신 구조에 적합합니다. 이 경고는 오탐으로 보입니다.
🔗 관련 이슈
📙 작업 설명
💬 추가 설명 or 리뷰 포인트
Summary by CodeRabbit