#497 Sometime we can no longer find the stop commit, catch the error then
Merged by pingou. Opened by pingou.
fix_pr_patch  into  master

Download 497.patch
no initial comment

Should diff_commits be empty in this case? Or, should it include request.commit_stop?

In the UI, it's empty and this change is for the patch endpoint.

Hm. If request.commit_stop does not exist, should we raise a 404 error?

The problem is that we run into this situation if for example a PR is merged manually.
Then the hash of the commit changes and we can't display the changes anymore because we can't find the stop commit and iterate to the start commit.

In this case the UI won't show the diff but will still show the comments. The patch view, will return an empty diff.

Hm, ok. :+1:

Seems odd to me still, though. I could then request a patch url for some_real_hex..something_totally_made_up, and it would just return "nothing" instead of an error like 'something_totally_made_up' is not a commit.

The patch url is only for a PR (or a single commit) I believe

Metadata