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

gh

Package Overview
Dependencies
Maintainers
2
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.

  • 1.10.0
  • Source
  • npm
  • Socket score

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

Node GH

NPM version NPM downloads Build Status Dependencies Status DevDependencies Status

Class Octocat

All the power of GitHub in your terminal.

Table of contents

Install

[sudo] npm install -g gh

Usage

gh [command] [payload] [--flags]

List all comands options

gh help --all

Dependencies

In order to sucessfully run this project you must have NodeJS installed.

Demonstration

Demo

Config

There are some pretty useful configurations that you can set on .gh.json. This file can be found under home directory (on MacOSx: /Users/yourName/.gh.json on Windows: C:\\Users\yourName\.gh.json).

You can also set per-project configurations by adding a .gh.json file in your project's root folder and overriding existing keys.

"api": { "host": "api.github.com", "protocol": "https", "version": "3.0.0" } ```

  • Set default branch and remote.

"default_branch": "master", "default_remote": "origin" ```

"default_pr_forwarder": "", "default_pr_reviewer": "" ```

  • GitHub data filled once you log in.

"github_token": "", "github_user": "" ```

  • Run automated tasks before or after a certain command.

"hooks": { "pull-request": { "merge": { "before": [{"cmd": "ls -la", "log": true}], "after": [ "gh pr {{options.number}} --comment 'Thank you, pull request merged :D'" ] } } } ```

  • Run automated tasks passing arguments to the commands. Required for prompt commands.

"hooks": { "pull-request": { "merge": { "before": [{"cmd": "foo", "args": ["bar", "qux"]}] } } } ```

  • Set default branch name prefix for PR fetching.

"pull_branch_name_prefix": "pr-" ```

  • Insert signature below issue comment.

"signature": "

:octocat: Sent from GH." ```

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

Plugins

  • GH Gif - A plugin for commenting on pull requests/issues using GIF reactions.
  • GH Travis - A plugin for integrating Travis, a continous integration server.
  • GH Jira - A plugin for integrating Jira, an issue management system.

Feel free to create your own plugins by forking GH Boilerplate.

Tasks

  • Bump package version, create tag, commit and push.

grunt bump # v0.0.1 grunt bump:minor # v0.1.0 grunt bump:major # v1.0.0 ```

grunt format ```

  • Run JSHint, a tool to detect errors and potential problems.

grunt lint ```

  • Run Mocha, a unit test framework.

grunt test ```

  • Watch for changes and run lint and test tasks.

grunt watch ```

  • Shortcut for jshint and mochaTest tasks.

grunt ```

Team

Node GH is maintained by these guys and some awesome contributors.

Eduardo LundgrenZeno RochaHenrique VicenteBruno Coelho
Eduardo LundgrenZeno RochaHenrique VicenteBruno Coelho

Contributing

For detailed instructions, check Contributing.

History

For detailed changelog, check Releases.

License

BSD License

Keywords

FAQs

Package last updated on 19 Feb 2015

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