Skip to content

fix: fork PR 지원을 위한 Claude Code 워크플로우 수정#14

Closed
haedoang wants to merge 0 commit intoGrowing-Up-Together:masterfrom
haedoang:feature/CLD-1
Closed

fix: fork PR 지원을 위한 Claude Code 워크플로우 수정#14
haedoang wants to merge 0 commit intoGrowing-Up-Together:masterfrom
haedoang:feature/CLD-1

Conversation

@haedoang
Copy link
Copy Markdown
Contributor

개요

fork 저장소에서 upstream으로 보내는 PR에서 Claude Code가 정상 작동하도록 GitHub Actions 워크플로우를 수정합니다.

문제 상황

에러

fatal: couldn't find remote ref ORD-5
Error: Prepare step failed with error: Command failed: git fetch origin --depth=20 ORD-5

원인

  • PR 구조: haedoang/orderstream (fork, ORD-5 브랜치 존재) → Growing-Up-Together/orderstream (upstream, ORD-5 브랜치 없음)
  • GitHub Actions는 upstream 저장소에서 실행
  • 수동 checkout 단계가 upstream만 체크아웃
  • claude-code-action이 내부적으로 git fetch origin ORD-5 실행 시 브랜치를 찾을 수 없음

해결 방법

변경 사항

  • 수동 checkout 단계 제거: actions/checkout@v5 단계 삭제
  • claude-code-action이 내부적으로 PR context를 인식하여 fork PR 처리
  • action이 자동으로 적절한 저장소(fork)에서 브랜치 체크아웃

기술적 배경

# Before (문제 발생)
steps:
  - name: Checkout repository
    uses: actions/checkout@v5     # upstream만 체크아웃
  - name: Run Claude Code
    uses: anthropics/claude-code-action@v1

# After (해결)
steps:
  - name: Run Claude Code
    uses: anthropics/claude-code-action@v1  # fork PR도 자동 처리

추가된 파일

.github/workflows/claude.yml

  • GitHub Actions 워크플로우 설정
  • 이슈 코멘트, PR 코멘트, PR 리뷰에서 @claude 멘션 트리거
  • fork PR을 올바르게 처리하도록 구성

테스트 계획

참고 자료

🤖 Generated with Claude Code

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