All the power of GitHub in your terminal.
gh [command] [payload] [--flags]
[sudo] npm install -g gh
In order to sucessfully run this project you must have NodeJS installed.
gh help
gh pull-request
Alias:
gh pr
| Option | Usage | Type |
|---|---|---|
-l, --list |
Required | Boolean |
-a, --all |
Optional | Boolean |
-d, --detailed |
Optional | Boolean |
-b, --branch |
Optional | String |
-r, --repo |
Optional | String |
-S, --state |
Optional | [open, closed] |
-s, --user |
Optional | String |
-
List open pulls requests for the current branch.
gh pr ```
-
List open pulls requests for all branches.
gh pr --list --all ```
-
List open pulls requests with link and content.
gh pr --list --detailed ```
-
List open pulls requests for a branch.
gh pr --list --branch master ```
| Option | Usage | Type |
|---|---|---|
-f, --fetch |
Required | Boolean |
-n, --number |
Required | Number |
-M, --merge |
Optional | Boolean |
-R, --rebase |
Optional | Boolean |
-r, --repo |
Optional | String |
-s, --user |
Optional | String |
-
Fetch pull request and checkout into a new branch
pull-1.
gh pr 1 ```
-
Fech pull request rebasing or merging into the current branch.
gh pr 1 --fetch --rebase
gh pr 1 --fetch --merge
```
| Option | Usage | Type |
|---|---|---|
-M, --merge |
Required | Boolean |
-R, --rebase |
Required | Boolean |
-n, --number |
Optional | Number |
-b, --branch |
Optional | String |
-r, --repo |
Optional | String |
-s, --user |
Optional | String |
Omitting --number will try to guess the pull number from branch name e.g. pull-1 results in --number 1. Omitting --branch will merge or rebase into config.default_branch.
-
Merge or rebase pull request into a branch.
gh pr 1 --merge ```
```
gh pr 1 --rebase ```
-
Merge or rebase pull request into branch
dev.
gh pr 1 --rebase --branch dev ```
```
gh pr 1 --merge --branch dev ```
| Option | Usage | Type |
|---|---|---|
-c, --comment |
Required | String |
-n, --number |
Required | Number |
-r, --repo |
Optional | String |
-s, --user |
Optional | String |
-
Comment on a pull request.
gh pr 1 --comment "Merged, thank you!" ```
| Option | Usage | Type |
|---|---|---|
--fwd |
Required | String |
-n, --number |
Required | Number |
-
Forward a pull request to another reviewer.
gh pr 1 --fwd username ```
| Option | Usage | Type |
|---|---|---|
-o, --open |
Required | Boolean |
-C, --close |
Required | Boolean |
-n, --number |
Required | Number |
-r, --repo |
Optional | String |
-s, --user |
Optional | String |
-
Open a pull request.
gh pr 1 --open ```
-
Close a pull request.
gh pr 1 --close ```
-
Open or close a pull request that you've sent to someone.
gh pr 1 --close --user eduardolundgren ```
| Option | Usage | Type |
|---|---|---|
-s, --submit |
Required | String |
-b, --branch |
Optional | String |
-r, --repo |
Optional | String |
-t, --title |
Optional | String |
Omitting --title will submit a pull request using current branch name as title.
-
Submit a pull request using the current branch.
gh pr --submit eduardolundgren --title 'Fix #32' ```
-
Submit a pull request using the current branch to dev branch.
gh pr --submit eduardolundgren --branch dev ```
gh notifications
Alias:
gh nt
| Option | Usage | Type |
|---|---|---|
-l, --latest |
Required | Boolean |
-r, --repo |
Optional | String |
-s, --user |
Optional | String |
-
Display the latest activities on the current repository.
gh nt ```
-
Display the latest activities on a certain repository.
gh nt --latest --user eduardolundgren --repo node-gh ```
| Option | Usage | Type |
|---|---|---|
-w, --watch |
Required | Boolean |
-r, --repo |
Optional | String |
-s, --user |
Optional | String |
-
Watch for any activity on the current repository.
gh nt --watch ```
-
Watch for any activity on a certain repository.
gh nt --watch --user eduardolundgren --repo node-gh ```
gh issue
Alias:
gh is
| Option | Usage | Type |
|---|---|---|
-N, --new |
Required | Boolean |
-t, --title |
Required | String |
-L, --label |
Optional | String |
-m, --message |
Optional | String |
-r, --repo |
Optional | String |
-u, --user |
Optional | String |
-
Create a new issue on the current repository.
gh is 'Node GH rocks!' 'Body with Markdown support' ```
-
Create a new issue on a certain repository.
gh is --new --title 'Node GH rocks!' --message 'Body with Markdown support' --user eduardolundgren --repo node-gh ```
-
Create a new issue with labels.
gh is --new --title 'Node GH rocks!' --label bug,question,test ```
| Option | Usage | Type |
|---|---|---|
-c, --comment |
Required | String |
-n, --number |
Required | Number |
-r, --repo |
Optional | String |
-u, --user |
Optional | String |
-
Comment on an issue of the current repository.
gh is 1 --comment 'Node GH rocks!' ```
-
Comment on an issue of a certain repository.
gh is 1 --comment 'Node GH rocks!' --user eduardolundgren --repo node-gh ```
| Option | Usage | Type |
|---|---|---|
-o, --open |
Required | Boolean |
-C, --close |
Required | Boolean |
-n, --number |
Required | Number |
-r, --repo |
Optional | String |
-s, --user |
Optional | String |
-
Open an issue.
gh is 1 --open ```
-
Close an issue.
gh pr 1 --close ```
-
Open or close an issue that you've sent to someone.
gh pr 1 --close --user eduardolundgren ```
| Option | Usage | Type |
|---|---|---|
-l, --list |
Required | Boolean |
-a, --all |
Optional | Boolean |
-d, --detailed |
Optional | Boolean |
-L, --label |
Optional | String |
-M, --milestone |
Optional | Number |
-r, --repo |
Optional | String |
-S, --state |
Optional | [open, closed] |
-u, --user |
Optional | String |
-
List all issues on the current repository.
gh is ```
-
List all issues from all repositories.
gh is --list --all ```
-
List issues with link and content.
gh is --list --detailed ```
-
List only closed issues on the current repository.
gh is --list --state closed ```
-
List issues filtered by milestone.
gh is --list --milestone 1 ```
-
List issues that contains labels
todoandbug.
gh is --list --label todo,bug ```
-
List all issues on a certain repository.
gh is --list --user eduardolundgren --repo node-gh ```
| Eduardo Lundgren | Zeno Rocha |
Contribute new commands to this project by copying and editing the content of Hello World example.
- v1.1.0 June 5, 2013
- Add
--milestonefilter flag on listing issues
- Add
- v1.0.0 June 4, 2013
- Rename commands and add shortcut for them
- Add default action for commands when no flags is passed
- v0.1.13 June 3, 2013
- Fixed error using wrong branch name when submitting a pull request
- v0.1.12 June 3, 2013
- Enable fetch PRs from private repos
- v0.1.11 June 2, 2013
- Add
--label,--stateand--detailedflags on listing issues - Add the hability to open/close an Issue
- Fixed error when running command outside of a Git repo
- Improve log for listing open and closed pull requests trough
--stateflag
- Add
- v0.1.10 May 30, 2013
- Cross platform process.env.HOME
- v0.1.8 May 30, 2013
- Open issue in browser
- Open pull request url on the browser after sending it
- v0.1.7 May 30, 2013
- Add hability to set number without
--numberflag
- Add hability to set number without
- v0.1.6 May 30, 2013
- Add the hability to specify a title on
gh pr --submit - Add password mask on authentication
- Bug fixes
- Add the hability to specify a title on
- v0.1.5 May 29, 2013
- Fix pull request integrity check
- v0.1.4 May 28, 2013
- Add the hability to create an Issue
- Add the hability to comment on an Issue
- Rename pull request
--commentto--message - Rename pull request
--pullto--number
- v0.1.3 May 28, 2013
- Remove mustache dependency
- v0.1.2 May 28, 2013
- Removing wrong number on submit
- v0.1.1 May 27, 2013
- Add Help task
- Standardize logs
- Bug fixes
- v0.1.0 May 26, 2013
- Allow log handlebars template from string
- Move apply replacements logic to logger
- Use handlebars templates instead of strings
- Refactoring template integration with logger
- Rename pull request
--commentto--message - Add Issues task
- v0.0.7 May 24, 2013
- Add pull request forward command
- Add Travis continous integration with JSHint
- Create a new website under gh-pages branch
- Update dependency version: git-wrapper@0.1.1
- Add Hello World and Notification tasks
- v0.0.6 May 17, 2013
- Add hability to merge or rebase pull request
- Add base.getUser and git.merge helpers
- v0.0.5 May 16, 2013
- Add login to be invoked by default in series
- v0.0.4 May 16, 2013
- Create ~/.gh.json if needed
- v0.0.3 May 16, 2013
- Merge user ~/.gh.json with default .gh.json
- Add default .gh.json
- Fix bin path
- v0.0.2 May 16, 2013
- Add fetch, open/close, message
- Use moment humanize utility
- v0.0.1 May 14, 2013
- Initial commit