Skip to content

feat(ci): integrate GitHub App token for release workflow - #50

Merged
baleen37 merged 2 commits into
mainfrom
chore/add-refactor
Jan 23, 2026
Merged

feat(ci): integrate GitHub App token for release workflow#50
baleen37 merged 2 commits into
mainfrom
chore/add-refactor

Conversation

@baleen37

@baleen37 baleen37 commented Jan 23, 2026

Copy link
Copy Markdown
Owner

Release workflow에 GitHub App token을 통합하여 다음 기능을 활성화:

주요 개선사항

  • CI 자동 트리거: Release PR이 CI workflow를 자동으로 실행
  • Issues 권한 추가: semantic-release가 issue 코멘트를 작성할 수 있도록 설정
  • 테스트 자동화: Release 전 BATS 테스트를 실행하여 코드 품질 검증
  • Rate limit 증가: 1,000 → 5,000 requests/hour

변경사항

  1. GitHub App token 생성

    • actions/create-github-app-token@v1 사용
    • MY_RELEASER_ID, MY_RELEASER_PRIVATE_KEY secrets 설정 완료
  2. Checkout 개선

    • GitHub App token 전달
    • persist-credentials: false (충돌 방지)
  3. 테스트 추가

    • npm ci로 의존성 설치
    • BATS 테스트 실행
  4. Release 단계

    • GITHUB_TOKEN을 GitHub App token으로 교체
    • PR merge 시 최종 release 수행

GitHub App 정보

  • App 이름: auto-update-bot-baleen
  • App ID: 2713674
  • 설치 위치: baleen37/claude-plugins
  • 권한: Contents (RW), Issues (RW), Pull Requests (RW)

참고

  • 프로덕션 검증된 패턴 적용
  • semantic-release 공식 지원
  • docs/GITHUB_APP_SETUP.md 참조

Summary by CodeRabbit

  • Documentation

    • Updated command documentation with usage hints for improved discoverability.
    • Added comprehensive dead-code refactoring guide with safe practices and testing protocols.
  • Chores

    • Enhanced release automation with improved token handling and workflow orchestration for merged pull requests.
    • Integrated testing framework into release pipeline for quality assurance.

✏️ Tip: You can customize this high-level summary in your review settings.

baleen37 and others added 2 commits January 23, 2026 17:17
…ross commands

- Add refactor-clean.md command for dead code detection and removal
- Change all hint fields to argument-hint for consistency
- Add appropriate argument hints to all commands
Release workflow에 GitHub App token을 통합하여 다음 기능을 활성화:

- **CI 자동 트리거**: Release PR이 CI workflow를 자동으로 실행
- **Issues 권한 추가**: semantic-release가 issue 코멘트를 작성할 수 있도록 설정
- **테스트 자동화**: Release 전 BATS 테스트를 실행하여 코드 품질 검증
- **Rate limit 증가**: 1,000 → 5,000 requests/hour

## 주요 변경사항

1. **GitHub App token 생성**
   - actions/create-github-app-token@v1 사용
   - MY_RELEASER_ID, MY_RELEASER_PRIVATE_KEY secrets 필요

2. **Checkout 개선**
   - GitHub App token 전달
   - persist-credentials: false (충돌 방지)

3. **테스트 추가**
   - npm ci로 의존성 설치
   - BATS 테스트 실행

4. **Release 단계**
   - GITHUB_TOKEN을 GitHub App token으로 교체
   - PR merge 시 최종 release 수행

## 참고
- 프로덕션 검증된 패턴 적용
- semantic-release 공식 지원

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@baleen37
baleen37 merged commit 280f526 into main Jan 23, 2026
1 check passed
@coderabbitai

coderabbitai Bot commented Jan 23, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The PR enhances the CI/CD release workflow with GitHub App token generation, introduces conditional release logic for merged pull requests, and adds argument-hint metadata to command documentation files alongside a new refactor-clean workflow guide.

Changes

Cohort / File(s) Summary
CI/CD Release Workflow
.github/workflows/release.yml
Adds GitHub App token generation, Node.js setup, npm install, and Bats test steps. Implements conditional logic: merged PRs trigger semantic-release for GitHub Release creation; otherwise, version detection and release branch/PR creation. Replaces direct GITHUB_TOKEN with app token for authentication.
Command Metadata Additions
plugins/me/commands/brainstorm.md, debug.md, orchestrate.md, research.md, sdd.md, verify.md
Each file receives a new front-matter field argument-hint with command-specific value hints (e.g., [<task>], [<issue>], [quick|full|pre-commit|pre-pr]). No behavioral changes; metadata enrichment only.
New Command Documentation
plugins/me/commands/refactor-clean.md
Introduces documentation for safe dead-code refactoring workflow, detailing language-agnostic detection methods, severity categorization, test-driven deletion protocol, and strict safeguards against unvalidated code removal.

Sequence Diagram(s)

sequenceDiagram
    participant GHA as GitHub Actions
    participant Token as GitHub App
    participant SR as Semantic Release
    participant Git as Git Repository
    participant API as GitHub API

    GHA->>Token: Generate App Token
    Token-->>GHA: Token Created
    GHA->>Git: Checkout with App Token
    GHA->>SR: Run Tests
    SR-->>GHA: Tests Pass/Fail
    
    alt Merged PR Event
        GHA->>SR: semantic-release (final)
        SR->>Git: Create Tag & Release
        Git->>API: Push Tag
        API->>GHA: Release Created
    else Non-Merged Event
        GHA->>SR: semantic-release (version update)
        SR->>Git: Update marketplace.json
        alt Version Changed
            GHA->>Git: Create release-v* branch
            Git->>API: Push Branch
            API->>GHA: PR Created
        else No Changes
            GHA->>GHA: Skip Release
        end
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • PR #48: Adds identical refactor-clean.md file and makes matching front-matter argument-hint changes across the same command markdown files.
  • PR #29: Modifies release workflow behavior and semantic-release configuration for version management and release branch/PR creation logic.
  • PR #27: Changes release workflow to avoid direct pushes to protected branches by detecting semantic-release changes and creating a release PR instead.

Suggested labels

released

Poem

🐰 Workflows spring with app-born token bright,
Commands now hint their arguments right,
Tests run swift before the release takes flight,
Dead code traced and cleaned with care and might,
A safer, smoother CI pipeline in sight! ✨


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.

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.

1 participant