Skip to content

Conversation

@thisismydesign
Copy link

The previous code review example used base.sha...head.sha which incorrectly shows commits added to main after the PR branch was created as 'removed' when the branch is not up to date with main.

This change:

  • Adds fetch-depth: 0 to get full git history
  • Computes merge-base to find the common ancestor between PR and base branch
  • Uses git diff with merge-base to show only changes introduced by the PR

This ensures the code review focuses on actual PR changes regardless of whether the branch is up to date with main.

The previous code review example used base.sha...head.sha which incorrectly
shows commits added to main after the PR branch was created as 'removed'
when the branch is not up to date with main.

This change:
- Adds fetch-depth: 0 to get full git history
- Computes merge-base to find the common ancestor between PR and base branch
- Uses git diff with merge-base to show only changes introduced by the PR

This ensures the code review focuses on actual PR changes regardless of
whether the branch is up to date with main.
@github-actions
Copy link

github-actions bot commented Jan 12, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@thisismydesign
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Jan 12, 2026
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