Git add-on for opening work item details in your browser based on the current branch. You can also print the JSON properties to stdout
for integration with other workflows.
It uses a regular expression to extract a work item identifier from the current branch name and inserts it into a URL via Go text templates.
You can configure the add-on's behavior through Git properties. See the following example:
[git-view-work-item]
url = "https://dev.azure.com/org/project/_workitems/edit/{{ .Identifier }}"
regex = "[0-9]+"
The following properties are available for you to insert into the URL:
Directory
: the current directory name (but not the full path).Identifier
: the identifier extracted from the current branch name.Repository
: the repository name, taken fromremote.origin.url
.Url
: the URL of the repository, taken fromremote.origin.url
.
You can learn more about Go text templates in the package documentation.
brew install hugginsio/tap/git-vwi
- Navigate to the releases page and download the appropriate binary for your system.
- Copy the
git-vwi
binary to somewhere on your PATH. - Run
git vwi -h
in your terminal to validate.