node-gh
All the power of GitHub in your terminal.
Usage
gh [command] [--flags]
Install
npm install -g gh
Dependencies
In order to sucessfully run this project you must have NodeJS installed.
Available commands
gh help
Pull requests
1. List
Option | Usage | Type |
---|
--list , -l | Required | Boolean |
--all , -a | Optional | Boolean |
--branch , -b | Optional | String |
--repo , -r | Optional | String |
--user , -s | Optional | String |
Examples
gh pr --list
```
gh pr --list --all
```
gh pr --list --branch master
```
2. Fetch
Option | Usage | Type |
---|
--fetch , -f | Required | Boolean |
--number , -n | Required | Number |
--merge , -M | Optional | Boolean |
--rebase , -R | Optional | Boolean |
--repo , -r | Optional | String |
--user , -s | Optional | String |
Examples
gh pr --number 1 --fetch
```
gh pr --number 1 --fetch --rebase
gh pr --number 1 --fetch --merge
```
3. Merge or rebase
Option | Usage | Type |
---|
--merge , -M | Required | Boolean |
--rebase , -R | Required | Boolean |
--number , -n | Optional | Number |
--branch , -b | Optional | String |
--repo , -r | Optional | String |
--user , -s | 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.defaultbranch
.
Examples
gh pr --merge [--number 1] [--branch master]
```
```
gh pr --rebase [--number 1] [--branch master]
```
Option | Usage | Type |
---|
--comment , -c | Required | String |
--number , -n | Required | Number |
--repo , -r | Optional | String |
--user , -s | Optional | String |
Examples
gh pr --number 1 --comment "Merged, thank you!"
```
5. Forward
Option | Usage | Type |
---|
--fwd | Required | String |
--number , -n | Required | Number |
Examples
gh pr --number 1 --fwd username
```
6. Open or close
Option | Usage | Type |
---|
--open , -o | Required | Boolean |
--close , -C | Required | Boolean |
--number , -n | Required | Number |
--repo , -r | Optional | String |
--user , -s | Optional | String |
Examples
gh pr --number 1 --open
```
gh pr --number 1 --close
```
gh pr --number 1 --close --user eduardolundgren
```
7. Submit
Option | Usage | Type |
---|
--submit , -s | Required | String |
--branch , -b | Optional | String |
Examples
gh pr --submit eduardolundgren
```
gh pr --submit eduardolundgren --branch dev
```
Notifications
1. Latest
Option | Usage | Type |
---|
--latest , -l | Required | Boolean |
--repo , -r | Optional | String |
--user , -s | Optional | String |
Examples
gh nt --latest
```
gh nt --latest --user eduardolundgren --repo node-gh
```
2. Watch
Option | Usage | Type |
---|
--watch , -w | Required | Boolean |
--repo , -r | Optional | String |
--user , -s | Optional | String |
Examples
gh nt --watch
```
gh nt --watch --user eduardolundgren --repo node-gh
```
Issues
1. Create
Option | Usage | Type |
---|
--new , -N | Required | Boolean |
--title , -t | Required | String |
--label , -L | Optional | String |
--message , -m | Optional | String |
--repo , -r | Optional | String |
--user , -u | Optional | String |
Examples
gh is --new --title 'Node GH rocks!' --message 'Markdown support'
```
gh is --new --title 'Node GH rocks!' --message 'Markdown support' --user eduardolundgren --repo node-gh
```
gh is --new --title 'Node GH rocks!' --label bug,question,test
```
Option | Usage | Type |
---|
--comment , -c | Required | String |
--number , -n | Required | Number |
--repo , -r | Optional | String |
--user , -u | Optional | String |
Examples
gh is --number 1 --comment 'Node GH rocks!'
```
gh is --number 1 --comment 'Node GH rocks!' --user eduardolundgren --repo node-gh
```
3. List
Option | Usage | Type |
---|
--list , -l | Required | Boolean |
--all , -a | Optional | String |
--repo , -r | Optional | String |
--user , -u | Optional | String |
Examples
gh is --list
```
gh is --list --all
```
gh is --list --user eduardolundgren --repo node-gh
```
Team
Contributing
Contribute new commands to this project by copying and editing the content of Hello World example.
History
- v0.1.2 May 28, 2013
- Add the hability to create an Issue
- Add the hability to comment on an Issue
- Rename pull request
--comment
to --message
- Rename pull request
--pull
to --number
- 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
--comment
to --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
License
BSD License