New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Permalinks for volatile links in comments #1448
Comments
I’m wondering if this should just be automatic. It’s easier to reach the latest version than it is to reach the linked version. |
@bfred-it You are assuming that the commenter meant to link to the commit at the time of the comment, but they might as well have been talking about just a file in general, which they want to show the latest version of. |
That’s why I said it’s easier to reach the latest version than the other way around. I could see why this might not be desirable though. However if the link points to a line, I’d assume that the author meant that line at that point in time and nothing else. I can’t think of a sensible way to do this (other than adding yet another icon next to each comment) Perhaps in the new comment dropdown? Could the previous functionality also be moved in there? |
This I agree with. Here the intention is clear. |
PR welcome. For anyone that wants this, please also send this feature request to GitHub: support@github.com |
Implemented how? We discussed a few options. I think the cleanest way would be to give a button to change all the non-perma-links to permalinks. Ideally on the whole thread. Perhaps a keyboard shortcut (as undiscoverable as that may be) Better yet, add the "code" icon next to all non-perma-links, like we do in the comment headers. Perhaps a bit noisy but pretty straightforward. |
After running into links where the line numbers didn't match anymore after some time, I believe that links to code lines should always be permalinks pointing to a specific commit. I like the way Bitbucket implemented this: When clicking a link to a line of code, the branch name is automatically replaced by the current commit hash in For existing links in comments or links from users who don't use this great extension, I agree with the proposed solution. |
Sometimes I stumble upon comments that link to a specific location on a repository’s default branch. For example: https://github.com/sindresorhus/refined-github/blob/master/source/libs/api.js#L3.
Such links are quite volatile, therefore, it would be awesome if Refined GitHub would add a “View link at the time of this comment” button next to such links.
This would be very similar to the existing “View repo at the time of this comment” functionality (#732), however, it would work for links to specific locations and for links to repositories other than the one where the comment was posted.
The text was updated successfully, but these errors were encountered: