wandersoncferreira / code-review

Code Reviews in Emacs
https://wandersoncferreira.github.io/code-review/
GNU General Public License v3.0
462 stars 49 forks source link

Code review submit fails if commits force-pushed to PR: "Start commit oid is not part of the pull request" #210

Open valer-cara opened 2 years ago

valer-cara commented 2 years ago

Describe the bug Force pushing commits in a PR causes an already open code-review to fail when submitting: Start commit oid is not part of the pull request

To Reproduce Steps to reproduce the behavior:

  1. Start reviewing a PR: code-review-start
  2. Force push a commit in the PR
  3. Submit the review: code-review-submit-approve
  4. Notice the bug. Submitting the review has failed with an error message: Start commit oid is not part of the pull request.

Expected behavior I believe there is no feature to cover this use case, but ideally the user would get a notice that the PR content has changed and get an option to Update.

Also, I believe that this situation is a dead end -- I found no way to backup my comments and easily import them in a fresh code-review. I can save the buffer to a file and manually copy/paste the comments to the appropriate locations, but that's difficult.

PS: I wished that the review contents is plain-text so it can easily be tweaked back in place, but i learned that code-review uses a database internally which makes it hard to port existing comments to a fresh code-review instance on the updated PR.

Screenshots n/a

Desktop (please complete the following information):

Additional context N/A

Thank you! 🙏