Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

git-open

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-open - npm Package Compare versions

Comparing version 1.5.0 to 2.0.0

2

package.json
{
"name": "git-open",
"version": "1.5.0",
"version": "2.0.0",
"description": "Type `git open` to open the GitHub/GitLab/Bitbucket homepage for a repository.",

@@ -5,0 +5,0 @@ "author": "Paul Irish (http://paulirish.com/)",

@@ -12,6 +12,6 @@ # git-open [![Build Status](https://img.shields.io/travis/paulirish/git-open/master.svg)](https://travis-ci.org/paulirish/git-open)

git open issue
git open --issue
```
(`git open` works with these [hosted repo providers](#supported-remote-repositories), `git open issue` currently only works with GitHub)
(`git open` works with these [hosted repo providers](#supported-remote-repositories), `git open --issue` currently only works with GitHub, Visual Studio Team Services and Team Foundation Server)

@@ -30,3 +30,3 @@ ### Examples

$ git open issue
$ git open --issue
# If branches use naming convention of issues/#123,

@@ -105,26 +105,45 @@ # opens https://github.com/TRACKED_REMOTE_USER/CURRENT_REPO/issues/123

- Atlassian Bitbucket Server (formerly _Atlassian Stash_)
- Visual Studio Team Services
- Team Foundation Server (on-premises)
### GitLab support
## Configuration
To configure GitLab support you need to set some options.
### Configuring the web destination (aka GitLab support)
| option name | description | example |
| ------------------------- | ---------------------------------------------------------- | ------------------ |
| gitopen.gitlab.domain | The (web)domain name that will work for most of the people | gitlab.example.com |
| gitopen.gitlab.ssh.domain | A specific ssh domain name, *if needed* | git.example.com |
| gitopen.gitlab.ssh.port | A specific ssh port, *if needed* | 10022 |
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
# use --global to set across all repos, instead of just the local one
git config [--global] gitopen.gitlab.domain [value]
git config [--global] gitopen.gitlab.ssh.domain [value]
git config [--global] gitopen.gitlab.ssh.port [value]
git config [--global] open.[gitdomain].domain [value]
git config [--global] open.[gitdomain].protocol [value]
```
If your Gitlab custom hosted is serving `http` you can also specify this:
**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
# use --global to set across all repos, instead of just the local one
git config [--global] gitopen.gitlab.protocol http
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

@@ -185,8 +204,13 @@

- **2017-06-17** - test suite added
- **2016-07-23** - readme -- fix oh-my-zsh install instructions
- **2016-07-22** - 1.1.0, update and add linters for package.json, readme.
Re-publish to NPM.
- **2016-07-11** - Changelog started (readme formatting and installation
instructions updated)
- **2017-12-01** - 2.0 shipped. Breaking change: [Gitlab configuration](https://github.com/paulirish/git-open#configuration) handled differently.
- **2017-12-01** - Configuration for custom remote added
- **2017-11-30** - Support for VSTS Added
- **2017-10-31** - `--issue` and `-h` added
- **2017-10-30** - Configuration for custom domains added
- **2017-10-30** - WSL support added
- **2017-06-16** - Introduced a test suite in BATS
- **2017-06-15** - Entire script rewritten and simplified by @dermagia
- **2016-07-23** - Readme: fix oh-my-zsh install instructions
- **2016-07-22** - 1.1.0 shipped. update and add linters for package.json, readme.
- **2016-07-11** - Readme formatting and installation instructions updated. Changelog started

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc