sindresorhus/refined-github

When linking to a line in a file, the generated link should go to the newest commit, not just the branch #4131

BeckmaR posted onGitHub

<!-- 1. Make sure your requested feature makes sense for Refined GitHub: https://github.com/sindresorhus/refined-github/issues/2960 2. Include a REAL URL where the feature should appear. e.g. Do you want a feature to appear on the main page of a repo? Paste a link to a repo -->

Situation now:

If I view a single file (like https://github.com/sindresorhus/refined-github/blob/main/license) and click a line, a link is generated like https://github.com/sindresorhus/refined-github/blob/main/license#L5.

Idea:

Since branches are a moving target, links to specific lines break all the time. Opening a file in its respective commit is needlessly complicated in github (you have to click on the file's newest commit, find the file in the diff view and then view that file again). It would be nice (if at all possible) if Refined GitHub could replace the link in the browser's url bar with one containing the latest revision. For the example linked above, this would be https://github.com/sindresorhus/refined-github/blob/57eea6faad444ba299da53439a72438c61122a67/license#L5 Since GitHub's issue viewer inlines these links in funny and different ways, here are the links in a raw form: https://github.com/sindresorhus/refined-github/blob/main/license https://github.com/sindresorhus/refined-github/blob/main/license#L5 https://github.com/sindresorhus/refined-github/blob/57eea6faad444ba299da53439a72438c61122a67/license#L5


I just found out there is already a way to do this: When a line is marked, use the appearing dot menu to copy the permalink.

posted by BeckmaR about 4 years ago

Fund this Issue

$0.00
Funded

Pull requests