Skip to content

Commit 1eb28d5

Browse files
David Parkeralexcanessa
authored andcommitted
Support GitHub enterprise (#73)
* Support GitHub enterprise Add support for private GHE installations by enabling a new `--api-url` argument ... example usage: `--api-url=https://MY_ENTERPRISE_DOMAIN/api/v3`. * Add api-url to options documentation
1 parent 3598ff7 commit 1eb28d5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docs/options.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ To pass it to the `GithubReleaseNotes` class, in the [configuration file](#confi
1616

1717
| Command | Options | Description | Default |
1818
| ------- | ------- | ----------- | ------- |
19+
| `api-url` | **Optional** | Override the GitHub API URL, allows **gren** to connect to a private [GHE](https://enterprise.github.com/) installation. _e.g. `https://my-enterprise-domain.com/api/v3`_ | `null` |
1920
| `username` | **Required** | The username of the repo _e.g. `github-tools`_ | `null` |
2021
| `repo` | **Required** | The repository name _e.g. `github-release-notes`_ | `null` |
2122
| `action`| `release` `changelog` | The **gren** action to run. _(see details below for changelog generator)_ | `release` |

src/gren.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ GithubReleaseNotes.prototype.init = function() {
861861

862862
var githubApi = new Github({
863863
token: gren.options.token
864-
});
864+
}, gren.options.apiUrl);
865865

866866
gren.repo = githubApi.getRepo(gren.options.username, gren.options.repo);
867867
gren.issues = githubApi.getIssues(gren.options.username, gren.options.repo);

0 commit comments

Comments
 (0)