Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Allow enterprise github usage #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Allow enterprise github usage #4

wants to merge 2 commits into from

Conversation

feugy
Copy link

@feugy feugy commented Sep 15, 2016

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.

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",
Copy link
Author

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",
Copy link
Author

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} = {}) {
Copy link
Author

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;
Copy link
Author

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.

@benogle
Copy link
Contributor

benogle commented Sep 16, 2016

Thanks for the PR, I'll take a look this weekend.

@feugy
Copy link
Author

feugy commented Sep 30, 2016

Up 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants