sindresorhus/refined-github
The issue has been closed
"View file" in PRs should point to the branch, not the commit #2260
fregante posted onGitHub
- Visit https://github.com/sindresorhus/refined-github/pull/2259/files
- Click "View file" in the dropdown of any file
- You'll be redirected to https://github.com/sindresorhus/refined-github/blob/0ae4f89ff9980db11a0d5d67ebb0b684230a5249/source/options.css
You're viewing a file in a PR on a different fork, but it's still shown as part of the origin
repo. This has a big flaw: you can't edit any files from this view, for example if you navigate to its sibling source/options.html
file you'll be on page https://github.com/sindresorhus/refined-github/blob/0ae4f89ff9980db11a0d5d67ebb0b684230a5249/source/options.html
How to code this feature
- This feature should probably be called
fix-view-file-link-in-pr
- You can fix the URL on demand (when the menu is opened) like
revert-file
does: https://github.com/sindresorhus/refined-github/blob/0ae4f89ff9980db11a0d5d67ebb0b684230a5249/source/options.css