Skip to content

Commit 4c0925e

Browse files
authored
Merge pull request #28 from Nawaid95/master
Minor api url changes.
2 parents 5b756cb + 5b40aeb commit 4c0925e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ NodePreGypGithub.prototype.init = function() {
2424
else {
2525
ownerRepo = this.package_json.repository.url.match(/https?:\/\/([^\/]+)\/(.*)(?=\.git)/i);
2626
if(ownerRepo) {
27-
this.host = ownerRepo[1];
27+
this.host = 'api.' + ownerRepo[1];
2828
ownerRepo = ownerRepo[2].split('/');
2929
this.owner = ownerRepo[0];
3030
this.repo = ownerRepo[1];
@@ -41,7 +41,7 @@ NodePreGypGithub.prototype.init = function() {
4141
}
4242

4343
this.octokit = NodePreGypGithub.prototype.octokit({
44-
baseUrl: 'https://' + this.host + '/api/v3',
44+
baseUrl: 'https://' + this.host,
4545
headers: {
4646
"user-agent": (this.package_json.name) ? this.package_json.name : "node-pre-gyp-github"
4747
}

0 commit comments

Comments
 (0)