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

gh

Package Overview
Dependencies
Maintainers
1
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gh

Github command line tools helps you improve using git and github from the terminal.

  • 0.1.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
25K
increased by26.79%
Maintainers
1
Weekly downloads
 
Created
Source

node-gh Build Status NPM version

Class Octocat

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

OptionUsageType
--list, -lRequiredBoolean
--all, -aOptionalBoolean
--branch, -bOptionalString
--repo, -rOptionalString
--user, -sOptionalString
Examples
  • List open pulls requests for the current branch.

gh pr --list ```

  • List open pulls requests for all branches.

gh pr --list --all ```

  • List open pulls requests for a branch.

gh pr --list --branch master ```

2. Fetch

OptionUsageType
--fetch, -fRequiredBoolean
--number, -nRequiredNumber
--merge, -MOptionalBoolean
--rebase, -ROptionalBoolean
--repo, -rOptionalString
--user, -sOptionalString
Examples
  • Fetch pull request and checkout into a new branch pull-1.

gh pr --number 1 --fetch ```

  • Fech pull request rebasing or merging into the current branch.

gh pr --number 1 --fetch --rebase gh pr --number 1 --fetch --merge ```

3. Merge or rebase

OptionUsageType
--merge, -MRequiredBoolean
--rebase, -RRequiredBoolean
--number, -nOptionalNumber
--branch, -bOptionalString
--repo, -rOptionalString
--user, -sOptionalString

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
  • Merge or rebase pull request into a branch.

gh pr --merge [--number 1] [--branch master] ```

```

gh pr --rebase [--number 1] [--branch master] ```

4. Comment

OptionUsageType
--comment, -cRequiredString
--number, -nRequiredNumber
--repo, -rOptionalString
--user, -sOptionalString
Examples
  • Comment on a pull request.

gh pr --number 1 --comment "Merged, thank you!" ```

5. Forward

OptionUsageType
--fwdRequiredString
--number, -nRequiredNumber
Examples
  • Forward a pull request to another reviewer.

gh pr --number 1 --fwd username ```

6. Open or close

OptionUsageType
--open, -oRequiredBoolean
--close, -CRequiredBoolean
--number, -nRequiredNumber
--repo, -rOptionalString
--user, -sOptionalString
Examples
  • Open a pull request.

gh pr --number 1 --open ```

  • Close a pull request.

gh pr --number 1 --close ```

  • Open or close a pull request that you've sent to someone.

gh pr --number 1 --close --user eduardolundgren ```

7. Submit

OptionUsageType
--submit, -sRequiredString
--branch, -bOptionalString
Examples
  • Submit a pull request using the current branch.

gh pr --submit eduardolundgren ```

  • Submit a pull request using the current branch to dev branch.

gh pr --submit eduardolundgren --branch dev ```

Notifications

1. Latest

OptionUsageType
--latest, -lRequiredBoolean
--repo, -rOptionalString
--user, -sOptionalString
Examples
  • Display the latest activities on the current repository.

gh nt --latest ```

  • Display the latest activities on a certain repository.

gh nt --latest --user eduardolundgren --repo node-gh ```

2. Watch

OptionUsageType
--watch, -wRequiredBoolean
--repo, -rOptionalString
--user, -sOptionalString
Examples
  • 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 ```

Issues

1. Create

OptionUsageType
--new, -NRequiredBoolean
--title, -tRequiredString
--label, -LOptionalString
--message, -mOptionalString
--repo, -rOptionalString
--user, -uOptionalString
Examples
  • Create a new issue on the current repository.

gh is --new --title 'Node GH rocks!' --message 'Markdown support' ```

  • Create a new issue on a certain repository.

gh is --new --title 'Node GH rocks!' --message 'Markdown support' --user eduardolundgren --repo node-gh ```

  • Create a new issue with labels.

gh is --new --title 'Node GH rocks!' --label bug,question,test ```

2. Comment

OptionUsageType
--comment, -cRequiredString
--number, -nRequiredNumber
--repo, -rOptionalString
--user, -uOptionalString
Examples
  • Comment on an issue of the current repository.

gh is --number 1 --comment 'Node GH rocks!' ```

  • Comment on an issue of a certain repository.

gh is --number 1 --comment 'Node GH rocks!' --user eduardolundgren --repo node-gh ```

3. List

OptionUsageType
--list, -lRequiredBoolean
--all, -aOptionalString
--repo, -rOptionalString
--user, -uOptionalString
Examples
  • List all issues on the current repository.

gh is --list ```

  • List all issues from all repositories.

gh is --list --all ```

  • List all issues on a certain repository.

gh is --list --user eduardolundgren --repo node-gh ```

Team

Eduardo LundgrenZeno Rocha
Eduardo LundgrenZeno Rocha

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
    • Initial commit

License

BSD License

Keywords

FAQs

Package last updated on 28 May 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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