Skip to content

🐝 VSCode plugin to quickly open files on Github and other providers. View Git blame information, copy permalinks and more.

License

Notifications You must be signed in to change notification settings

cdignam-segment/vscode-githubinator

 
 

Repository files navigation

VSCode plugin to quickly open files on Github and other providers. View Git blame information, copy permalinks and more. See the "commands" section of the README for more details.

Install

From online marketplace

Open the online marketplace listing for Githubinator and click "Install". Follow the prompts to open VSCode and install Githubinator.

From VSCode

In VSCode, type CMD+P and enter ext install chdsbd.githubinator. Or search for and install chdsbd.githubinator via the extensions tab.

From Github release

Download the extension package from the latest Github release and run code --install-extension githubinator-*.vsix

From source

With vsce installed from NPM (yarn global add vsce), clone this repo and run vsce package. Install the resulting package with code --install-extension githubinator-*.vsix

Features

feature X

Commands

command copy URL open URL mode SHA-type
Githubinator blob current branch
Githubinator: Copy blob current branch
Githubinator: Copy Main blob "main" branch
Githubinator: Copy Permalink blob current SHA
Githubinator: Copy Main Permalink blob "main" SHA
Githubinator: On Main blob "main" branch
Githubinator: Permalink blob current SHA
Githubinator: Blame blame current branch
Githubinator: Blame On Main blame "main" branch
Githubinator: Blame Permalink blame current sha
Githubinator: Repository open repo N/A
Githubinator: History open history N/A
Githubinator: Open PR open PR N/A
Githubinator: Compare compare branch N/A

The "main" branch is configured via githubinator.mainBranches (see "Extension Settings" below).

Requirements

  • Local Git repository. You must have a git repository configured with a remote. ("origin" is default but this can be changed in settings).

Extension Settings

  • githubinator.contextMenu: Enable access to Githubinator commands from the context menu ("enabled"|"submenu"|"disabled"). (default: "enabled")
  • githubinator.mainBranches: Branch names to use as main repository branch. (default: ["main", "master", "trunk", "develop", "dev"])
  • githubinator.remote: The default remote branch for a repository. (default: "origin")
  • githubinator.providers.github.remote: Remote name to look for when identifying a Github origin. (default: "origin")
  • githubinator.providers.github.hostnames: Hostnames for identifying a Github origin and building a URL. (default: ["github.com"])
  • githubinator.providers.gitlab.remote: Remote name to look for when identifying a Gitlab origin. (default: "origin")
  • githubinator.providers.gitlab.hostnames: Hostnames for identifying a Gitlab origin and building a url. (default: ["gitlab.com"])
  • githubinator.providers.bitbucket.remote: Remote name to look for when identifying a Bitbucket origin. (default: "origin")
  • githubinator.providers.bitbucket.hostnames: Hostnames for identifying a Bitbucket origin and building a url. (default: ["bitbucket.org"])

Prior Art

This plugin is based on the Sublime Plugin by ehamiter with the same name.

project providers blame history compare permalink master copy open open-pr one-step actions provider autodetection
this project Github, Bitbucket, Gitlab
d4rkr00t/vscode-open-in-github (vscode) Github
ziyasal/vscode-open-in-github (vscode) Github, Bitbucket, Gitlab, Visualstudio ✅*

* changeable in settings between permalink and branch

Development

# install dependencies
make install
# lint (tslint and formatting)
make lint
# format code
make format
# check formatting
make format-ci
# run tests
make test
# run linting and testing
make test-ci

VSCode instructions

Get up and running straight away

  • Press F5 to open a new window with your extension loaded.
  • Run your command from the command palette by pressing (Ctrl+Shift+P or Cmd+Shift+P on Mac) and typing Hello World.
  • Set breakpoints in your code inside src/extension.ts to debug your extension.
  • Find output from your extension in the debug console.

Make changes

  • You can relaunch the extension from the debug toolbar after changing code in src/extension.ts.
  • You can also reload (Ctrl+R or Cmd+R on Mac) the VS Code window with your extension to load your changes.

Run tests

  • Open the debug viewlet (Ctrl+Shift+D or Cmd+Shift+D on Mac) and from the launch configuration dropdown pick Extension Tests.
  • Press F5 to run the tests in a new window with your extension loaded.
  • See the output of the test result in the debug console.
  • Make changes to test/extension.test.ts or create new test files inside the test folder.
    • By convention, the test runner will only consider files matching the name pattern **.test.ts.
    • You can create folders inside the test folder to structure your tests any way you want.

Publish

vsce package
vsce login chdsbd
vsce publish <version>

Logo

Based on the Git Logo by Jason Long, licensed under the Creative Commons Attribution 3.0 Unported License..

About

🐝 VSCode plugin to quickly open files on Github and other providers. View Git blame information, copy permalinks and more.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 99.3%
  • Makefile 0.7%