sindresorhus/refined-github

Fix "Commit range not found" pages linked from notifications #2779

waldyrious posted onGitHub

When pull request branches are force-pushed, the links in the notification tries to open the diff of the new changes, but that does work, resulting in a "Commit range not found" message (and the notification remains marked as unread).

Example URL (copied from the links in the notifications page): https://github.com/alif-type/libertinus/pull/297/files/4371c159cc447047d55a3012f13ee229c2e9e616..aaf70cbb6f3a5377786da765f635c0f54b7b0569

In such cases, the page should show instead the main PR page — in the example above, https://github.com/alif-type/libertinus/pull/297.


This is a bug from GitHub, not refined GitHub. I don’t think we can safely fix this

posted by fregante about 5 years ago

Fair enough. I'll open an issue at https://github.com/isaacs/github.

posted by waldyrious about 5 years ago
posted by fregante about 5 years ago

Update: I've opened https://github.com/isaacs/github/issues/1733.

Note that working around this bug would be quite simple: we would just need to replace pull/297/files with compare in the link. It works as expected:

https://github.com/alif-type/libertinus/compare/4371c159cc447047d55a3012f13ee229c2e9e616..aaf70cbb6f3a5377786da765f635c0f54b7b0569

posted by waldyrious about 5 years ago

We can’t do that because we don’t know if the link is valid in the first place. Sometimes the link is valid and useful.

posted by fregante about 5 years ago

Fund this Issue

$0.00
Funded

Pull requests