-
Notifications
You must be signed in to change notification settings - Fork 354
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
🚀 Show Github commit hyperlinks even if remote URL does not contain git@
#667
Comments
(Fwiw, if you deem this to a feature you want included in the first place, I'd be happy to submit a PR adding it if that's useful :) |
Hi @spaarmann, we recently added this option:
Am I right in thinking that that can be used to solve this? (It takes precedence over the auto-recognizing of github URLs) |
That could be used to make hyperlinks work but unless I'm missing something, I believe that would have to be configured for every repository / clone separately, because the custom format would have to include the |
Yes, you're right. Ok, sure, it would be great if you're able to improve this regex! |
Great! I'm about to go to bed, but I'll look at sending a PR tomorrow. |
…erlinks Closes dandavison#667. SSH remote URLs are usually formatted as `git@github.com:user/repo` but certain setups can allow using just `github.com:user/repo`, see issue dandavison#667 for an example. This modifies the regex used to detect a GitHub remote for hyperlink generation to also allow the latter form.
…erlinks (#668) Closes #667. SSH remote URLs are usually formatted as `git@github.com:user/repo` but certain setups can allow using just `github.com:user/repo`, see issue #667 for an example. This modifies the regex used to detect a GitHub remote for hyperlink generation to also allow the latter form.
Hi! I was recently a bit confused why hyperlinks for commits were working in some of my local clones but not others.
After a bit of investigation I've figured out that it's caused by the remote URL being simply
github.com:user/repo
instead ofgit@github.com:user/repo
, which is not matched by the current regex.Now, this remote URL only works in the first place because of a custom SSH config containing something like this:
Considering that I fully understand if you'd prefer to not support such configs out-of-the-box. (You can also put anything into the
Host
portion there and have it still end up going to GitHub with configs like this and I imagine that parsing the SSH config or anything similar to make everything here work is definitely out of scope 😄 ).Still, I figured specifically allowing omitting the
git@
is a pretty small change so I might as well ask (and I suspect this is at least a somewhat common config; I don't remember where I stole it, but I definitely got the idea from someone else).The text was updated successfully, but these errors were encountered: