Skip to content

Keep reviews aligned with current pull request diffs#211

Open
PeterDaveHello wants to merge 1 commit into
anc95:mainfrom
PeterDaveHello:fixRebasedSynchronizeDiff
Open

Keep reviews aligned with current pull request diffs#211
PeterDaveHello wants to merge 1 commit into
anc95:mainfrom
PeterDaveHello:fixRebasedSynchronizeDiff

Conversation

@PeterDaveHello

Copy link
Copy Markdown
Contributor

Summary

  • Use commit comparisons only to select files changed since the last review, then review their current pull request patches.
  • Mark generated reviews so incremental comparisons use a trusted baseline and fall back to the full pull request diff when comparison results are unsafe.
  • Validate hunk locations before creating inline comments and preserve unpositioned findings in the review body.
  • Propagate handler failures to GitHub Actions and add regression coverage for comparison and comment-positioning paths.

Why

After a rebase or force-push, comparing the previous reviewed commit with the new head can produce a diverged, repository-wide diff that no longer matches the pull request. Using those patches can omit relevant changes or create invalid inline comment positions. Review failures could also leave the workflow with a successful conclusion.

Validation

  • npm test -- --runInBand — 52 tests passed
  • npm run build
  • git diff HEAD^ HEAD --check

Use commit comparisons only to select files changed since the last
review, then use their current pull request patches.
Fall back to the full pull request diff when incremental comparison
is unsafe.

Validate review identity and hunk locations before creating comments.
Propagate handler failures to GitHub Actions.
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