-
Notifications
You must be signed in to change notification settings - Fork 15
Allow enterprise github usage #4
base: master
Are you sure you want to change the base?
Conversation
Allows to configuer host and API path prefix to allow usage of Enterprise on premise Github repos.
@@ -29,10 +29,13 @@ | |||
"dependencies": { | |||
"bluebird": "^3.0.6", | |||
"expand-home-dir": "0.0.3", | |||
"github": "^0.1.16", | |||
"github": "^3.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Required to access Enterprise github.
No need to specify a given version when instantiating the wrapper.
"yargs": "^3.31.0" | ||
}, | ||
"devDependencies": { | ||
"babel-cli": "^6.14.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because some folks doesn't have babel globally installed :)
timeout: 10000, | ||
protocol: 'https' | ||
}); | ||
function authenticate({host, pathPrefix} = {}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than using a global unic wrapper, creates during authentication, that allows to configure host
}; | ||
if (host) { | ||
opts.pathPrefix = pathPrefix || '/api/v3'; | ||
opts.host = host; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pathPrefix is required to access Enterprise github, however, it's reasonable to provide a default value.
Thanks for the PR, I'll take a look this weekend. |
Up 😄 |
Allows to configuer host and API path prefix to allow usage of Enterprise
on premise Github repos.
Also update to latest github API wrapper, required to access Enterprise Github.