Codium-ai / pr-agent

🚀CodiumAI PR-Agent: An AI-Powered 🤖 Tool for Automated Pull Request Analysis, Feedback, Suggestions and More! 💻🔍
Apache License 2.0
5.62k stars 518 forks source link

Bitbucket server uses 2-way diff but Codium AI uses 3-way diff #1131

Closed MarkRx closed 1 week ago

MarkRx commented 1 month ago

Bitbucket Server 7.0 switched from a 3-way diff (compare 2 branch tips) to a 2-way diff (compare against a common ancestor). See this blog.

Codium AI is currently performing a 3-way diff which doesn't match what BB PR diffs show (2-way) resulting in the bot commenting on code that does not show up as modified in the BB PR UI. This results in confusion.

Looks like I accidently broke it with ee90f385011164c7e05912dac18c82ec6bde1ef1. I'll submit a PR to fix it. It's more than a simple revert of the effected lines since as I recall the existing code didn't handle certain scenarios correctly.

mrT23 commented 1 month ago

@taisyalobanov @okotek

KennyDizi commented 1 month ago

Bitbucket Server 7.0 switched from a 3-way diff (compare 2 branch tips) to a 2-way diff (compare against a common ancestor). See this blog.

Codium AI is currently performing a 3-way diff which doesn't match what BB PR diffs show (2-way) resulting in the bot commenting on code that does not show up as modified in the BB PR UI. This results in confusion.

Looks like I accidently broke it with ee90f38. I'll submit a PR to fix it. It's more than a simple revert of the effected lines since as I recall the existing code didn't handle certain scenarios correctly.

I can confirm that. It doesn't look obvious on bitbucket server.