Skip to content

fix: handle commits unrelated to default branch - #128

Open
a-zw wants to merge 1 commit into
mainfrom
fix-unconnected-commits
Open

a-zw wants to merge 1 commit into
mainfrom
fix-unconnected-commits

Conversation

@a-zw

@a-zw a-zw commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@a-zw
a-zw requested review from AlexanderLanin and a balanced review from Copilot October 21, 2026 13:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused fix preserves successful comparison behavior and includes regression coverage, with no unresolved findings.

No open issues 🎉

What changed in this PR

This PR prevents lazy GitHub comparison failures from interrupting repository metric collection when refs have unrelated histories.

Changes:

  • Guard lazy divergence-count reads with the existing exception handling.
  • Log a repository-specific warning when refs have no common ancestor.
  • Add tests for successful comparisons, immediate failures, and lazy no-common-ancestor errors.
File Description
tests/​test_repo_overview.py Adds focused comparison and error-handling regression coverage.
src/​generate_repo_overview/​collector/​reference_integration.py Catches lazy comparison failures and warns when histories are unrelated.

Review effort: Balanced

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.

2 participants