Skip to content

Commit 00a20d1

Browse files
authored
Merge pull request #4 from wata727/support_github_enterprise
Support GitHub Enterprise
2 parents e122ce5 + 073a018 commit 00a20d1

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,19 @@ Release {{version}}
6868
{{/prs}}
6969
```
7070

71+
### GitHub Enterprise
72+
If you use this plugin in GitHub Enterprise, you can specify endpoint domain for GitHub Enterprise.
73+
74+
```javascript
75+
release({
76+
token: 'token'
77+
owner: 'uiureo',
78+
repo: 'awesome-web-app',
79+
template: './template.mustache'
80+
endpoint: 'https://github.yourdomain.com/api/v3'
81+
})
82+
```
83+
7184
## Example
7285

7386
### hubot

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)