Skip to content

Commit 7383bf5

Browse files
authored
add endpoint config param for Github Enterprise
1 parent e122ce5 commit 7383bf5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/github-client.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ function GithubClient (config) {
88
this.token = config.token
99
this.head = config.head || 'master'
1010
this.base = config.base || 'production'
11+
this.endpoint = config.endpoint || 'https://api.github.com'
1112
}
1213

1314
GithubClient.prototype.pullRequestEndpoint = function () {
14-
return 'https://api.github.com/repos/' + this.owner + '/' + this.repo + '/pulls'
15+
return this.endpoint + '/repos/' + this.owner + '/' + this.repo + '/pulls'
1516
}
1617

1718
GithubClient.prototype.headers = function () {

0 commit comments

Comments
 (0)