GitLink
GitLink copied to clipboard
Don't work with Gitlab groups
Hi!
The link generation doesn't work well with Gitlab groups.
For example, [email protected]:group1/group2/repo-name.git
=> https://gitlab.selfhost.io/group1/group2/-/blob/master/some-file.md
. But it should be like https://gitlab.selfhost.io/group1/group2/repo-name/-/blob/master/some-file.md
same error to me...
Feel free to submit a PR ensuring backwards compatibility.
I'm very bad with python; I think it's where you get repo
variable...
(I see, we use custom private domain gitlab, maybe it's HOSTINGS value which are not compatible)
I read that you use : git rev-parse ...
, but it show empty when I try with cli.
Have you think of another way to get this info ?
maybe like this :
## Get remote URL
git config --get remote.origin.url
[email protected]:group/project.git
## Translate to HTTPS
git config --get remote.origin.url |sed -r 's/git@([^:]*):(.*).git/https:\/\/\1\/\2/'
https://gitlab.jeremi.fr/group/project
Hope this help...
no news ?
As I don't understand why I'm being downvoted, I'm sharing an alternative version using the build system
here's the link: https://forum.sublimetext.com/t/giturltoclipboard/72778
Downvote for assuming updates. Maintainer has already stated he'd consider a PR if it didn't cause regressions. I didn't downvote any of your other comments.
You're unwilling to write any Python. Would you be interested in experimenting with just a regex change? Possibly the only thing required is to change the contents of some capture groups.
https://github.com/rscherf/GitLink/blob/master/GitLink.py#L82