Repository navigation
fix: push 이벤트에서 github.event.before가 0일 때 commit 검사 - #6
Merged
Merged
Conversation
github.event.before가 0000…(신규 브랜치 첫 푸시)이면 base..head가 무효라 rev-list가 실패함. base가 0이거나 존재하지 않으면 origin/main..head로 대체, 없으면 head만 rev-list. project: kkamppak agent: cursor-background role: worker artifacts: LOG-20260409-001 Co-authored-by: devuterian <devuterian@users.noreply.github.com>
Co-authored-by: devuterian <devuterian@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
문제
github.event.before가0000000…(신규 브랜치 첫 푸시 등)이면git rev-list base..head가 Invalid revision range로 실패합니다.해결
scripts/check-commit-range.sh에서:before가 전부 0이거나 빈 값이거나 유효한 커밋이 아니면 →origin/main..head로 검사 (fetch 후 존재)origin/main이 없으면 →head만rev-list(초기 저장소 등)merge 커밋 제외(
--no-merges)는 기존과 동일합니다.검증
로컬에서
check-commit-range.sh 0000… HEAD실행 시 exit 0.