Comparing version 2.0.0 to 2.1.0
@@ -12,4 +12,5 @@ { | ||
"MD033": false, | ||
"MD034": false, | ||
"MD036": false, | ||
"MD041": false | ||
} |
{ | ||
"name": "git-open", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Type `git open` to open the GitHub/GitLab/Bitbucket homepage for a repository.", | ||
@@ -33,7 +33,10 @@ "author": "Paul Irish (http://paulirish.com/)", | ||
}, | ||
"man": "./git-open.1", | ||
"scripts": { | ||
"lint:editorconfig": "eclint check git-open* readme* .travis.yml", | ||
"lint:package": "pjv --recommendations --warnings", | ||
"lint:readme": "node ./node_modules/markdownlint/lib/markdownlint.js --config markdownlint.json README.md", | ||
"test": "npm run unit && npm run lint:package && npm run lint:readme && npm run lint:editorconfig", | ||
"lint:readme": "markdownlint --config markdownlint.json README.md", | ||
"lint:man": "markdownlint --config markdownlint.json git-open.1.md", | ||
"man": "marked-man --version \"git-open $npm_package_version\" --manual \"Git manual\" --section 1 git-open.1.md > git-open.1", | ||
"test": "npm run unit && npm run lint:package && npm run lint:man && npm run lint:readme && npm run lint:editorconfig", | ||
"unit": "bats test/", | ||
@@ -45,5 +48,6 @@ "watch": "find . -maxdepth 2 -iname '*bats' -o -iname 'git-open' | entr bats test/" | ||
"eclint": "^2.1.0", | ||
"markdownlint": "^0.2.0", | ||
"markdownlint-cli": "^0.13.0", | ||
"marked-man": "^0.2.1", | ||
"package-json-validator": "^0.6.1" | ||
} | ||
} |
@@ -5,3 +5,3 @@ # git-open [![Build Status](https://img.shields.io/travis/paulirish/git-open/master.svg)](https://travis-ci.org/paulirish/git-open) | ||
![git open2015-01-24 13_51_18](https://cloud.githubusercontent.com/assets/39191/5889192/244a0b72-a3d0-11e4-8ab9-55fc64228aaa.gif) | ||
![Demo of git open in action](https://user-images.githubusercontent.com/39191/33507513-f60041ae-d6a9-11e7-985c-ab296d6a5b0f.gif) | ||
@@ -77,4 +77,3 @@ ## Usage | ||
1. `cd ~/.oh-my-zsh/custom/plugins` | ||
1. `git clone https://github.com/paulirish/git-open.git` | ||
1. `git clone https://github.com/paulirish/git-open.git $ZSH_CUSTOM/plugins/git-open` | ||
1. Add `git-open` to your plugin list - edit `~/.zshrc` and change | ||
@@ -107,43 +106,8 @@ `plugins=(...)` to `plugins=(... git-open)` | ||
- Team Foundation Server (on-premises) | ||
- AWS Code Commit | ||
## Configuration | ||
### Configuring the web destination (aka GitLab support) | ||
See the [man page](git-open.1.md) for more information on how to configure `git-open`. | ||
To configure GitLab support (or other unique hosting situations) you need to set some options. | ||
| option name | description | | ||
| ------------------------- | ---------------- | | ||
| open.[gitdomain].domain | The (web) domain to open based on the provided git repo domain | | ||
| open.[gitdomain].protocol | The (web) protocol to open based on the provided git repo domain. (Defaults to `https`) | | ||
```sh | ||
git config [--global] open.[gitdomain].domain [value] | ||
git config [--global] open.[gitdomain].protocol [value] | ||
``` | ||
**Example** | ||
* Your git remote is at `ssh://git@git.internal.biz:7000/XXX/YYY.git` | ||
* Your hosted gitlab is `http://repo.intranet/subpath/XXX/YYY` | ||
```sh | ||
git config [--global] "open.https://git.internal.biz.domain" "repo.intranet/subpath" | ||
git config [--global] "open.https://git.internal.biz.protocol" "http" | ||
``` | ||
### Configuring which remote to open | ||
By default, `git open` opens the remote named `origin`. However, if your current branch is [remotely-tracking](https://git-scm.com/book/en/v2/Git-Branching-Remote-Branches#_tracking_branches) a different remote, that tracked remote will be used. | ||
In some instances, you may want to override this behavior. When you fork a project | ||
and add a remote named `upstream` you often want that upstream to be opened | ||
rather than your fork. To accomplish this, you can set the `open.default.remote` within your project: | ||
```sh | ||
git config open.default.remote upstream | ||
``` | ||
This is equivalent to always typing `git open upstream`. | ||
## Alternative projects | ||
@@ -173,2 +137,3 @@ | ||
You can run `git-open` in `echo` mode, which doesn't open your browser, but just prints the URL to stdout: | ||
```sh | ||
@@ -178,3 +143,3 @@ env BROWSER='echo' ./git-open | ||
#### Testing: | ||
### Testing: | ||
@@ -181,0 +146,0 @@ You'll need to install [bats](https://github.com/sstephenson/bats#installing-bats-from-source), the Bash automated testing system. It's also available as `brew install bats` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
162718
56
15
4
178