Skip to content

[FIX] pr생성 커밋 플로우 통합#105

Merged
ujinsim merged 2 commits intomainfrom
feat/#84
Nov 17, 2025
Merged

[FIX] pr생성 커밋 플로우 통합#105
ujinsim merged 2 commits intomainfrom
feat/#84

Conversation

@ujinsim
Copy link
Copy Markdown
Collaborator

@ujinsim ujinsim commented Nov 17, 2025

🔥 연관 이슈

🚀 작업 내용

Flow1에서 PR merge 후 브랜치 생성 → Flow2 workflow를 기다리는 구조를 제거

🤔 고민했던 내용

💬 리뷰 중점사항

Summary by CodeRabbit

릴리스 노트

  • Chores
    • GitHub Actions 워크플로우를 통합하여 자동화된 버전 관리 및 npm 배포 프로세스를 개선했습니다.
    • 이제 버전 업데이트, PR 생성, 자동 병합, npm 게시가 단일 워크플로우에서 처리됩니다.
    • 불필요한 워크플로우를 제거하여 CI/CD 파이프라인을 간소화했습니다.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Nov 17, 2025

Warning

Rate limit exceeded

@ujinsim has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 11 minutes and 19 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 7c5be22 and 36196db.

📒 Files selected for processing (1)
  • .github/workflows/bump-and-publish.yaml (6 hunks)

워크플로우 개요

CI/CD 워크플로우를 통합하여 버전 범프, PR 생성/자동 병합, npm 게시를 단일 워크플로우로 처리하도록 변경. bump-pr.yaml 워크플로우 제거 및 bump-and-publish.yaml 워크플로우 수정.

변경 사항

코호트 / 파일 변경 요약
워크플로우 삭제
.github/workflows/bump-pr.yaml
기존 범프 PR 생성 및 게시 워크플로우 제거
워크플로우 통합
.github/workflows/bump-and-publish.yaml
워크플로우 이름 변경, pull-requests: writepackages: write 권한 추가, 작업 ID bump-versionbump-and-publish 변경, npm 레지스트리 URL 설정 추가, PR 생성 및 자동 병합 로직 추가, npm 게시 단계 추가, 버전 범프 및 내보내기 동기화 로직 개선

시퀀스 다이어그램

sequenceDiagram
    participant main as main 브랜치
    participant workflow as Bump & Publish 워크플로우
    participant gh as GitHub API
    participant npm as npm 레지스트리
    
    main->>workflow: 트리거 (main에 푸시)
    workflow->>workflow: package.json 버전 변경 감지
    workflow->>workflow: UI 폴더 변경 감지
    workflow->>workflow: 버전 범프 및 내보내기 동기화
    workflow->>gh: 범프 브랜치 생성 및 푸시
    workflow->>gh: PR 생성 (gh pr create)
    gh->>workflow: PR 생성 완료
    workflow->>gh: PR 자동 병합 (gh pr merge)
    gh->>main: 변경 사항 병합
    workflow->>npm: npm에 게시 (NODE_AUTH_TOKEN)
    npm->>workflow: 게시 완료
Loading

예상 코드 리뷰 노력

🎯 3 (보통) | ⏱️ ~20-30분

  • 주의 필요 영역:
    • PR 생성 및 자동 병합 로직의 정확성 확인 (gh pr create, gh pr merge 명령 순서 및 옵션)
    • NODE_AUTH_TOKEN 환경 변수 설정 및 npm 게시 단계의 보안
    • 버전 범프 로직 재구성으로 인한 버전 계산 정확성 검증
    • UI 폴더 감지 및 내보내기 동기화 로직의 완전성 확인
    • 기존 bump-pr.yaml 제거로 인한 워크플로우 통합 일관성 확인

관련 가능성이 있는 PR

제안 라벨

fix

제안 리뷰어

  • keemsebin
  • yougyung

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive PR 설명이 연관 이슈, 작업 내용을 포함하고 있으나, '고민했던 내용'과 '리뷰 중점사항' 섹션이 비어있어 템플릿 완성도가 낮습니다. 비어있는 '고민했던 내용'과 '리뷰 중점사항' 섹션을 채워 설명을 더 완성도 있게 작성해 주세요.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목은 두 개의 워크플로우 파일 변경(bump-and-publish.yaml 통합, bump-pr.yaml 제거)을 아우르는 '플로우 통합' 작업을 명확히 설명하고 있으며, 변경 요약과 일치합니다.
Linked Issues check ✅ Passed 코드 변경사항이 이슈 #84의 두 가지 요구사항(npm 자동 배포, 자동 버전 업데이트)을 모두 충족합니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 워크플로우 통합과 npm 자동 배포 프로세스 구현에 관련되어 있으며, 이슈 #84의 범위 내에 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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
Copy Markdown

@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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/bump-and-publish.yaml (1)

71-89: 버전 파싱 오류 처리 누락

package.json의 버전 문자열을 파싱할 때 형식 검증이 없습니다. 잘못된 형식의 버전(예: "1.2", "invalid")이 있으면 split 결과가 3개가 아니므로 undefined 값이 발생할 수 있습니다.

버전 파싱 전 검증을 추가하세요:

          node -e "
            const fs = require('fs');
            const pr_title = process.env.PR_TITLE;
            const is_new_ui = process.env.NEW_UI_FOLDER === 'true';
            const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
-           const [a,b,c] = pkg.version.split('.').map(Number);
+           const parts = pkg.version.split('.').map(Number);
+           if (parts.length !== 3 || parts.some(isNaN)) {
+             console.error('Invalid version format:', pkg.version);
+             process.exit(1);
+           }
+           const [a,b,c] = parts;
            let new_version;
            if(is_new_ui) new_version = [a+1,0,0].join('.');
            else if(pr_title.toLowerCase().startsWith('feat')) new_version = [a,b+1,0].join('.');
            else new_version = [a,b,c+1].join('.');
            pkg.version = new_version;
            fs.writeFileSync('package.json', JSON.stringify(pkg,null,2)+'\n');
          "
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6d633a4 and 7c5be22.

📒 Files selected for processing (2)
  • .github/workflows/bump-and-publish.yaml (6 hunks)
  • .github/workflows/bump-pr.yaml (0 hunks)
💤 Files with no reviewable changes (1)
  • .github/workflows/bump-pr.yaml
🔇 Additional comments (1)
.github/workflows/bump-and-publish.yaml (1)

26-30: Node.js 레지스트리 설정 확인

npm 배포를 위해 registry-url을 npmjs.org로 설정했습니다. NODE_AUTH_TOKEN 환경 변수가 올바르게 설정되었는지 확인하세요.

NPM_TOKEN 시크릿이 GitHub Actions 환경에서 사용 가능한지, 그리고 해당 토큰이 npm 배포 권한이 있는지 확인해주세요.

@ujinsim ujinsim merged commit 70cde93 into main Nov 17, 2025
2 checks passed
@ujinsim ujinsim deleted the feat/#84 branch November 17, 2025 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CHORE] main 브랜치 머지 시 npm 자동 배포 및 버저닝 설정

1 participant