From 32fa8efa65ab1838e627e3ddfc43a6224ade4631 Mon Sep 17 00:00:00 2001 From: David Parker Date: Sun, 16 Apr 2017 16:41:12 +0100 Subject: [PATCH 1/2] 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`. --- src/gren.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gren.js b/src/gren.js index 8b3bf9ef..230f06c0 100644 --- a/src/gren.js +++ b/src/gren.js @@ -861,7 +861,7 @@ GithubReleaseNotes.prototype.init = function() { var githubApi = new Github({ token: gren.options.token - }); + }, gren.options.apiUrl); gren.repo = githubApi.getRepo(gren.options.username, gren.options.repo); gren.issues = githubApi.getIssues(gren.options.username, gren.options.repo); From 490791aaf9ac62e214fe9501c8ae50a826908db6 Mon Sep 17 00:00:00 2001 From: David Parker Date: Sun, 16 Apr 2017 18:00:50 +0100 Subject: [PATCH 2/2] Add api-url to options documentation --- docs/options.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/options.md b/docs/options.md index 8e5c59f4..33ceb841 100644 --- a/docs/options.md +++ b/docs/options.md @@ -16,6 +16,7 @@ To pass it to the `GithubReleaseNotes` class, in the [configuration file](#confi | Command | Options | Description | Default | | ------- | ------- | ----------- | ------- | +| `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` | | `username` | **Required** | The username of the repo _e.g. `github-tools`_ | `null` | | `repo` | **Required** | The repository name _e.g. `github-release-notes`_ | `null` | | `action`| `release` `changelog` | The **gren** action to run. _(see details below for changelog generator)_ | `release` |