Sertion / vscode-gitblame

Visual Studio Code Extension - See Git Blame info in status bar.
https://marketplace.visualstudio.com/items/waderyan.gitblame
MIT License
72 stars 31 forks source link

Problem with making commitUrl from project.remote #98

Closed tetafro closed 3 years ago

tetafro commented 3 years ago

Hi. My current project.remote looks like this:

git@example.com:8080/my-project/my-repo

Is there any way to make commitUrl look like this?

https://example.com/projects/my-project/repos/my-repo/commits/0123abc...
Sertion commented 3 years ago

Greetings Denis. Not right now to the best of my knowledge.

There is a token for grabbing parts of the gitorigin.hostname, but none for the path. Perhaps it could be added.

Sertion commented 3 years ago

A version with a new token has been uploaded and will be available shortly.

${gitorigin.path,n} - the nth part of the git origin path (e.g. if the git origin is https://github.com/ckb-next/ckb-next.git ${gitorigin.path,1} will return ckb-next.git

tetafro commented 3 years ago

Great, thanks. If somebody is looking for self-hosted bitbucket commitUrl, this one works for me:

https://company.com/projects/${gitorigin.path,1}/repos/${gitorigin.path,2}/commits/${hash}