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

Master or Main #134

Closed elcortez closed 1 year ago

elcortez commented 1 year ago

Hello, I'm using this great VS Code extension in order to open the specific file at the specific line in the master or main branch (basically what Atom does when you type CMD+MAJ+P & type "Blame")

Per your instructions, I've managed to make the extension open it with this commit url ${tool.protocol}//${gitorigin.hostname}${gitorigin.port}/${gitorigin.path}/blame/master/${file.path}#L${file.line}

However, I had to write "master" in plain text, for I don't see this option in the instructions, therefore it does not work on repositories that have a "main" branch instead of "master". It would be really AWESOME if you could make it work ! <3

Sertion commented 1 year ago

Hey Pierre! Thank you for the feature request.

That looks like something that could be added to the token generator.

If you want to give it a go I accept pull requests or I will get to it when I have the time.

elcortez commented 1 year ago

Hello, thanks for your answer, I would love to try, but I'm kind of a newbie in typescript. Can you point me to some link where I can learn how to properly test the app or maybe give me a command to run on my terminal to run the tests ?

Sertion commented 1 year ago

If you use vscode as your editor you should be able to run Extension and Test Extension from the Run and Debug menu in the sidebar. Here is an example of some tests for the token generator with some (unfortunately needed) mocking.

To get it up and running all you need is to fork the repository, clone it and run npm install. If you want to check linting before committing you can run npm run lint.

Sertion commented 1 year ago

I had some time over the Easter break and built this. It will be part of 10.2.0. The token is called ${project.defaultbranch}

elcortez commented 1 year ago

Ohh woaw, thanks a lot ! that's amazing 🙏 👍 ❤️