Comparing version 0.0.6 to 0.0.7
@@ -22,2 +22,3 @@ 'use strict'; | ||
options.cache = 'cache' in options ? options.cache : null; | ||
options.tokens = 'tokens' in options ? options.tokens : []; | ||
@@ -30,2 +31,3 @@ this.authorization = options.authorization; | ||
this.factor = options.factor; | ||
this.tokens = options.tokens; | ||
this.user = options.user; | ||
@@ -50,4 +52,9 @@ this.api = options.url; | ||
var token = options.token || process.env.GITHUB_TOKEN || process.env.GITHULK_TOKEN; | ||
if (!this.authorization && token) { | ||
this.authorization = 'token '+ token; | ||
if (this.tokens.length && !~this.tokens.indexOf(token)) { | ||
this.tokens.unshift(token); | ||
} else { | ||
this.authorization = 'token '+ token; | ||
} | ||
} | ||
@@ -54,0 +61,0 @@ |
{ | ||
"name": "githulk", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Small but powerful Github client", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9722
204