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 - npm Package Compare versions

Comparing version 1.9.1 to 1.9.2

6

.gh.json

@@ -12,2 +12,6 @@ {

"default_pr_forwarder": "",
"default_pr_reviewer": "",
"git_command": "git",

@@ -116,2 +120,4 @@

"prefix": "gh",
"replace": {},

@@ -118,0 +124,0 @@

34

lib/base.js

@@ -56,2 +56,24 @@ /*

exports.getConfig = function(opt_plugin) {
var globalConfig = exports.getGlobalConfig(opt_plugin);
try {
var projectConfig = require(exports.getProjectConfigPath()),
result = {};
Object.keys(globalConfig).forEach(function(key) {
result[key] = globalConfig[key];
});
Object.keys(projectConfig).forEach(function(key) {
result[key] = projectConfig[key];
});
return result;
}
catch (err) {
return globalConfig;
}
};
exports.getGlobalConfig = function(opt_plugin) {
var config,

@@ -68,3 +90,3 @@ configPath,

try {
config = require(exports.getConfigPath());
config = require(exports.getGlobalConfigPath());
userConfig = require(configPath);

@@ -90,6 +112,10 @@

exports.getConfigPath = function() {
exports.getGlobalConfigPath = function() {
return path.join(__dirname, '../', '.gh.json');
};
exports.getProjectConfigPath = function() {
return path.join(process.cwd(), '.gh.json');
};
exports.getUserHomePath = function() {

@@ -100,3 +126,3 @@ return userhome('.gh.json');

exports.removeGlobalConfig = function(key) {
var config = exports.getConfig();
var config = exports.getGlobalConfig();

@@ -112,3 +138,3 @@ delete config[key];

exports.writeGlobalConfig = function(jsonPath, value) {
var config = exports.getConfig(),
var config = exports.getGlobalConfig(),
i,

@@ -115,0 +141,0 @@ output,

4

lib/cmds/notification.js

@@ -176,6 +176,6 @@ /*

case 'IssueCommentEvent':
txt = 'commented on an issue at';
txt = 'commented on issue #' + payload.issue.number + ' at';
break;
case 'IssuesEvent':
txt = payload.action + ' an issue at';
txt = payload.action + ' issue #' + payload.issue.number + ' at';
break;

@@ -182,0 +182,0 @@ case 'MemberEvent':

@@ -134,5 +134,7 @@ /*

options.fwd = options.fwd || config.default_pr_forwarder;
options.number = options.number || instance.getPullRequestNumberFromBranch_();
options.pullBranch = instance.getBranchNameFromPullNumber_(options.number);
options.state = options.state || PullRequest.STATE_OPEN;
options.submit = options.submit || config.default_pr_reviewer;

@@ -139,0 +141,0 @@ if (options.browser) {

@@ -229,4 +229,5 @@ /*

payload = {
type: options.type,
user: user
type: 'all',
user: user,
per_page: '100'
};

@@ -233,0 +234,0 @@

@@ -87,5 +87,6 @@ /*

logger.compileTemplate = function(source, map) {
var template;
var template,
prefix = base.getConfig().prefix || 'gh';
map.prefix = clc.cyan('gh');
map.prefix = clc.cyan(prefix);

@@ -159,3 +160,4 @@ template = handlebars.compile(source);

handlebars.registerHelper('wordwrap', function(text, padding, stripNewLines) {
var gutter = '';
var gutter = '',
prefix = base.getConfig().prefix;

@@ -172,3 +174,3 @@ if (stripNewLines !== false) {

return text.join('\n' + clc.cyan('gh') + gutter);
return text.join('\n' + clc.cyan(prefix) + gutter);
});

@@ -175,0 +177,0 @@

{
"name": "gh",
"description": "GitHub command line tools.",
"version": "1.9.1",
"version": "1.9.2",
"homepage": "http://nodegh.io",

@@ -6,0 +6,0 @@ "author": {

@@ -1,3 +0,9 @@

# Node GH [![Build Status](https://secure.travis-ci.org/node-gh/gh.png?branch=master)](https://travis-ci.org/node-gh/gh) [![NPM version](https://badge.fury.io/js/gh.png)](http://badge.fury.io/js/gh) [![Dependency Status](https://david-dm.org/node-gh/gh.png)](https://david-dm.org/node-gh/gh)
# Node GH
[![NPM version](http://img.shields.io/npm/v/gh.svg?style=flat)](http://npmjs.org/gh)
[![NPM downloads](http://img.shields.io/npm/dm/gh.svg?style=flat)](http://npmjs.org/gh)
[![Build Status](http://img.shields.io/travis/node-gh/gh/master.svg?style=flat)](https://travis-ci.org/node-gh/gh)
[![Dependencies Status](http://img.shields.io/david/node-gh/gh.svg?style=flat)](https://david-dm.org/node-gh/gh)
[![DevDependencies Status](http://img.shields.io/david/dev/node-gh/gh.svg?style=flat)](https://david-dm.org/node-gh/gh#info=devDependencies)
![Class Octocat](http://nodegh.io/images/class-octocat.jpg)

@@ -130,3 +136,3 @@

```
* List open pull requests and sort them by complexity *(complexity is calculated based on number of additions, deletions, changed files, comments and review comments)*.

@@ -228,2 +234,5 @@

Omitting a value for `--fwd` fallbacks to the `default_pr_forwarder` key found
in your [config file](#config).
#### Examples

@@ -290,3 +299,5 @@

Omitting `--title` will submit a pull request using the last commit message as title.
Omitting a value for `--submit` fallbacks to the `default_pr_reviewer` key found
in your [config file](#config). Omitting `--title` will submit a pull request
using the last commit message as title.

@@ -916,2 +927,4 @@ #### Examples

You can also set per-project configurations by adding a `.gh.json` file in your project's root folder and overriding existing keys.
* GitHub API configurations. Change it if you're a [GitHub Enterprise](https://enterprise.github.com/) user.

@@ -934,2 +947,9 @@

* Set default users when [submitting](#7-submit) or [forwarding](#5-forward) pull requests.
```javascript
"default_pr_forwarder": "",
"default_pr_reviewer": ""
```
* GitHub data filled once you log in.

@@ -942,3 +962,3 @@

* Automate tasks to be runned before or after a certain command.
* Run automated tasks before or after a certain command.

@@ -945,0 +965,0 @@ ```javascript

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