Skip to content

[#4] 여러 repository에 적용 가능한 branch merge conflict 가능성 rule을 구성한다#14

Merged
opficdev merged 3 commits into
developfrom
feat/#4-rule
Jun 22, 2026
Merged

[#4] 여러 repository에 적용 가능한 branch merge conflict 가능성 rule을 구성한다#14
opficdev merged 3 commits into
developfrom
feat/#4-rule

Conversation

@opficdev

Copy link
Copy Markdown
Owner

🔗 연관된 이슈

🎯 의도

  • 여러 repository에 적용 가능한 branch merge conflict 가능성 rule 구성

📝 작업 내용

📌 요약

  • branch merge risk 분석 모델 추가
  • GitMergeSignal과 branch metadata 기반 risk score/reason 계산 구성
  • same file overlap, same hunk overlap, failed check, critical file rule 추가
  • README에 충돌 가능성 판단 알고리즘 문서화
  • risk analyzer 단위 테스트 추가

🔍 상세

  • src/risks/types.tsBranchRisk, BranchRiskReason, BranchChangedHunk, BranchRiskAnalysisInput, BranchRiskAnalysisOptions 타입 추가
  • src/risks/riskAnalyzer.tsanalyzeBranchMergeRisks 추가
  • confirmed_conflict signal을 score 100과 critical status로 처리
  • merge_check_failed signal을 medium risk reason으로 처리
  • 여러 branch가 같은 파일을 수정한 경우 same_file_overlap reason 생성
  • 여러 branch가 같은 파일의 겹치는 hunk line range를 수정한 경우 same_hunk_overlap reason 생성
  • branch check metadata의 실패 conclusion을 failed_check reason으로 반영
  • criticalFilePatterns 설정으로 repository별 민감 파일 변경을 critical_file_changed reason으로 반영
  • 적용된 rule이 없으면 deterministic clean_merge reason 생성
  • score를 reason별 impact 합산 후 최대 100점으로 제한
  • score 구간을 low, medium, high, critical status로 변환
  • src/index.ts에서 risk analyzer API와 타입 export
  • README.md에 signal별 score와 status 구간 설명 추가
  • tests/risks/riskAnalyzer.test.ts에 rule별 단위 테스트 추가
  • npm run build, npm test, git diff --check 검증

📸 영상 / 이미지 (Optional)

@opficdev opficdev self-assigned this Jun 22, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이번 PR은 브랜치 간 머지 충돌 가능성을 분석하여 점수 및 위험도를 산출하는 Risk Analyzer 모듈을 추가하고 관련 테스트와 README 문서를 작성했습니다. 코드 리뷰에서는 브랜치 쌍 비교 시 중복 연산을 제거하여 성능을 개선하는 방안과, 정규식 컴파일 오버헤드를 줄이기 위해 와일드카드 매칭 로직을 단순화하는 방안이 제안되었습니다.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/risks/riskAnalyzer.ts
Comment thread src/risks/riskAnalyzer.ts
@opficdev opficdev merged commit ea9d27e into develop Jun 22, 2026
3 checks passed
@opficdev opficdev deleted the feat/#4-rule branch June 22, 2026 01:32
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.

여러 repository에 적용 가능한 branch merge conflict 가능성 rule을 구성한다

1 participant