Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

Commit

Permalink
fix(pull-request): add option in config to use https instead of ssh
Browse files Browse the repository at this point in the history
fix #436
  • Loading branch information
Ryan Garant committed Oct 11, 2018
1 parent ecc23c8 commit 7dac953
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1239,6 +1239,12 @@ You can also set per-project configurations by adding a `.gh.json` file in your
"signature": "<br><br>:octocat: *Sent from [GH](http://nodegh.io).*"
```

- Turn off ssh when pulling a repo and use https instead.

```javascript
"ssh": false,
```

If you need to use a custom git command, set the environment variable `GH_GIT_COMMAND`.

## Plugins
Expand Down
2 changes: 1 addition & 1 deletion lib/cmds/pull-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ PullRequest.prototype.fetch = function(opt_type, opt_callback) {
}

headBranch = pull.head.ref
repoUrl = pull.head.repo.ssh_url
repoUrl = config.ssh === false ? pull.head.repo.clone_url : pull.head.repo.ssh_url

git.fetch(repoUrl, headBranch, options.pullBranch)

Expand Down
4 changes: 4 additions & 0 deletions lib/default.gh.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,9 @@

"replace": {},

"ssh": true,

"color": true,

"signature": " <br><br>:octocat: *Sent from [GH](http://nodegh.io).*"
}

0 comments on commit 7dac953

Please sign in to comment.