fix(github): use committer date for commit range to handle rebases - #2845
fix(github): use committer date for commit range to handle rebases#2845IsmaelMartinez wants to merge 2 commits into
Conversation
The author date is preserved across rebases, causing the range to appear empty after a force-push. Switching to the committer date aligns with GitLab and ensures changed files are detected correctly.
PR Summary by QodoFix GitHub incremental reviews after rebases
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1.
|
…eview A fully rebased branch leaves every commit newer than the previous review, so no baseline commit is available and the incremental diff would compare against a None ref, silently yielding empty original content.
|
Code review by qodo was updated up to the latest commit 56f8eca |
Fixes #2844.
get_commit_rangecompared author dates against the previous review timestamp. Git preserves the author date across a rebase, so after a force-push the commit range came back empty and the reviewer reported no changes when the code had changed.Now prefers the committer date, which advances on rebase, falling back to the author date when a committer is absent. This is what
_GitLabIncrementalCommitalready does on the GitLab side.Four regression tests: rebased commit detected as new, pre-review commit still excluded, author-date fallback, and mixed-commit scoping. The first fails on
mainand passes with the fix.