Comparing version
@@ -1,3 +0,3 @@ | ||
## [Version 2.1.0](https://github.com/:paulirish/git-open/releases/tag/v2.1.0) (2018-12-3) | ||
[Full changelog](https://github.com/:paulirish/git-open/compare/v2.0.0...v2.1.0) | ||
## [Version 2.1.0](https://github.com/paulirish/git-open/releases/tag/v2.1.0) (2018-12-3) | ||
[Full changelog](https://github.com/paulirish/git-open/compare/v2.0.0...v2.1.0) | ||
@@ -14,10 +14,10 @@ ### New features | ||
- Fix bug with open -i on default VSTS project repo: [`67b72ac`](https://github.com/:paulirish/git-open/commit/67b72ac), [`aea6e3e`](https://github.com/:paulirish/git-open/commit/aea6e3e) | ||
- Use ls-remote --get-url to get remote url: [`740222b`](https://github.com/:paulirish/git-open/commit/740222b) | ||
- Fix shellcheck: [`775361b`](https://github.com/:paulirish/git-open/commit/775361b) | ||
- Fix incompatability with bash < 4: [`895240f`](https://github.com/:paulirish/git-open/commit/895240f) | ||
- Swap uppercase/lowercase for ssh feature: [`995e915`](https://github.com/:paulirish/git-open/commit/995e915) ([#123](https://github.com/:paulirish/git-open/issues/123)) | ||
- Remove openopt, allow spaces in $BROWSER: [`96c80ff`](https://github.com/:paulirish/git-open/commit/96c80ff) | ||
- readme: One liner install for oh-my-zsh: [`29434cd`](https://github.com/:paulirish/git-open/commit/29434cd) | ||
- deps: change markdownlint to markdownlint-cli: [`702b8a6`](https://github.com/:paulirish/git-open/commit/702b8a6), [`5b815cb`](https://github.com/:paulirish/git-open/commit/5b815cb) | ||
- Fix bug with open -i on default VSTS project repo: [`67b72ac`](https://github.com/paulirish/git-open/commit/67b72ac), [`aea6e3e`](https://github.com/paulirish/git-open/commit/aea6e3e) | ||
- Use ls-remote --get-url to get remote url: [`740222b`](https://github.com/paulirish/git-open/commit/740222b) | ||
- Fix shellcheck: [`775361b`](https://github.com/paulirish/git-open/commit/775361b) | ||
- Fix incompatability with bash < 4: [`895240f`](https://github.com/paulirish/git-open/commit/895240f) | ||
- Swap uppercase/lowercase for ssh feature: [`995e915`](https://github.com/paulirish/git-open/commit/995e915) ([#123](https://github.com/paulirish/git-open/issues/123)) | ||
- Remove openopt, allow spaces in $BROWSER: [`96c80ff`](https://github.com/paulirish/git-open/commit/96c80ff) | ||
- readme: One liner install for oh-my-zsh: [`29434cd`](https://github.com/paulirish/git-open/commit/29434cd) | ||
- deps: change markdownlint to markdownlint-cli: [`702b8a6`](https://github.com/paulirish/git-open/commit/702b8a6), [`5b815cb`](https://github.com/paulirish/git-open/commit/5b815cb) | ||
@@ -24,0 +24,0 @@ |
@@ -6,3 +6,3 @@ # git-open - Open the repository's website in your browser. | ||
`git open` [--issue] [remote-name] [branch-name] | ||
`git open` [--issue] [--commit] [--suffix some_suffix] [remote-name] [branch-name] | ||
@@ -18,2 +18,6 @@ | ||
`-c`, `--commit` | ||
Open the current commit. See `EXAMPLES` for more information. | ||
Only tested with GitHub & GitLab. | ||
`-i`, `--issue` | ||
@@ -24,6 +28,11 @@ Open the current issue. When the name of the current branch matches the right pattern, | ||
`-s`, `--suffix` some_suffix | ||
Append the given suffix to the url | ||
`-p`, `--print` | ||
Just print the URL. Do not open it in browser. | ||
`-h` | ||
Show a short help text. | ||
## EXAMPLES | ||
@@ -56,3 +65,22 @@ | ||
```sh | ||
git open --suffix pulls | ||
``` | ||
It opens the URL https://github.com/TRACKED_REMOTE_USER/CURRENT_REPO/pulls | ||
```sh | ||
git open --print | ||
``` | ||
It prints the URL https://github.com/TRACKED_REMOTE_USER/CURRENT_REPO/ | ||
```sh | ||
git open --commit | ||
``` | ||
Supposing that the current sha is `2ddc8d4548d0cee3d714dcf0068dbec5b168a9b2`, it opens | ||
https://github.com/TRACKED_REMOTE_USER/CURRENT_REPO/commit/2ddc8d4548d0cee3d714dcf0068dbec5b168a9b2 | ||
## SUPPORTED GIT HOSTING SERVICES | ||
@@ -59,0 +87,0 @@ |
{ | ||
"name": "git-open", | ||
"version": "2.1.0", | ||
"version": "3.0.0", | ||
"description": "Type `git open` to open the GitHub/GitLab/Bitbucket homepage for a repository.", | ||
@@ -35,18 +35,18 @@ "author": "Paul Irish (http://paulirish.com/)", | ||
"scripts": { | ||
"lint:editorconfig": "eclint check git-open* readme* .travis.yml", | ||
"lint:package": "pjv --recommendations --warnings", | ||
"lint:editorconfig": "eclint check ./git-open *.md *.yml", | ||
"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/", | ||
"watch": "find . -maxdepth 2 -iname '*bats' -o -iname 'git-open' | entr bats test/" | ||
"shellcheck": "shellcheck ./git-open", | ||
"lint": "npm run lint:readme && npm run lint:man && npm run lint:editorconfig", | ||
"test": "npm run unit && npm run lint", | ||
"watch": "find . -maxdepth 2 -iname '*bats' -o -iname 'git-open' | entr bats test/", | ||
"prepublishOnly": "npm run man && npm run test" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"eclint": "^2.1.0", | ||
"markdownlint-cli": "^0.13.0", | ||
"marked-man": "^0.2.1", | ||
"package-json-validator": "^0.6.1" | ||
"markdownlint-cli": "^0.32.0", | ||
"marked-man": "^0.7.0" | ||
} | ||
} |
@@ -11,4 +11,16 @@ # git-open [](https://travis-ci.org/paulirish/git-open) | ||
git open [remote-name] [branch-name] | ||
# Open the page for this branch on the repo website | ||
git open --commit | ||
git open -c | ||
# Open the current commit in the repo website | ||
git open --issue | ||
git open -i | ||
# If this branch is named like issue/#123, this will open the corresponding | ||
# issue in the repo website | ||
git open --print | ||
git open -p | ||
# Only print the url at the terminal, but don't open it | ||
``` | ||
@@ -33,2 +45,8 @@ | ||
# opens https://github.com/TRACKED_REMOTE_USER/CURRENT_REPO/issues/123 | ||
$ git open --print | ||
# prints https://github.com/TRACKED_REMOTE_USER/CURRENT_REPO/tree/CURRENT_BRANCH | ||
$ git open --suffix pulls | ||
# opens https://github.com/TRACKED_REMOTE_USER/CURRENT_REPO/pulls | ||
``` | ||
@@ -80,3 +98,3 @@ | ||
1. Add `git-open` to your plugin list - edit `~/.zshrc` and change | ||
`plugins=(...)` to `plugins=(... git-open)` | ||
`plugins=(...)` to `plugins=(... git-open)` | ||
@@ -136,8 +154,2 @@ #### [Zgen](https://github.com/tarjoilija/zgen) | ||
You can run `git-open` in `echo` mode, which doesn't open your browser, but just prints the URL to stdout: | ||
```sh | ||
env BROWSER='echo' ./git-open | ||
``` | ||
### Testing: | ||
@@ -170,3 +182,5 @@ | ||
- **2017-12-01** - 2.0 shipped. Breaking change: [Gitlab configuration](https://github.com/paulirish/git-open#configuration) handled differently. | ||
- **2018-12-03** - [2.1.0 shipped](https://github.com/paulirish/git-open/releases/tag/v2.1.0). | ||
- **2017-12-01** - [2.0 shipped](https://github.com/paulirish/git-open/releases/tag/v2.0.0). Breaking change: [Gitlab configuration](https://github.com/paulirish/git-open#configuration) handled differently. | ||
- **2017-12-01** - Configuration for custom remote added | ||
@@ -173,0 +187,0 @@ - **2017-11-30** - Support for VSTS Added |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
166429
2.28%3
-25%192
7.87%54
-3.57%