-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support GitHub Enterprise in CLI
Add a `--url` option to the CLI to allow users of `conventional-github-releaser` to provide a custom URL for GitHub, which can be used to specify the API endpoint for an on-premise GitHub Enterprise instance. ```bash conventional-github-releaser --url https://api.github.com ``` Replace the `github` package with `gh-got` to simplify the way we interact with GitHub's API. Posting new releases is the only part of the GitHub API that we need to interact with, and `github` is a litte heavy for our purposes. Default to `https://api.github.com` as the endpoint so as to maintain the behavior supported by `github` when issuing requests to the GitHub API. The default URL is technically set by `gh-got`, so no further work is required on our part. BREAKING CHANGE: The `github` package has been replaced by `gh-got`. Options supported by `github` (https://www.npmjs.com/package/github) can no longer be provided through the `auth` parameter to `conventional-github-releaser`. To set a custom URL for GitHub please do one of the following: * If calling the `conventional-github-releaser` API, pass a URL as the `url` property of the `auth` parameter to `conventional-github-releaser`. The URL should be the fully qualified domain and path of the GitHub API, such as `https://api.github.com` or `https://api.github.example.com`. * If calling the `conventional-github-releaser` CLI, either pass a URL using the `--url` option, or set the `CONVENTIONAL_GITHUB_URL` environment variable. * If calling the CLI or API, set the `GITHUB_ENDPOINT` environment variable supported by the underlying `gh-got` library - https://www.npmjs.com/package/gh-got#endpoint
- Loading branch information
Showing
11 changed files
with
1,789 additions
and
930 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"extends": "xo-space", | ||
"rules": { | ||
"camelcase": ["error", {"properties": "never"}], | ||
"comma-dangle": ["error", "always-multiline"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"automerge": true, | ||
"major": { | ||
"automerge": false | ||
}, | ||
"labels": ["refactor"], | ||
"pinVersions": false, | ||
"prCreation": "not-pending", | ||
"rebaseStalePrs": true, | ||
"semanticCommits": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.