Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
feat(input): add github API URL configuration for input (#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoHsu committed Sep 23, 2021
1 parent 56e7d78 commit fd7f2ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -60,6 +60,7 @@ Automate releases with Conventional Commit Messages.
| `default-branch` | branch to open pull release PR against (detected by default) |
| `pull-request-title-pattern` | title pattern used to make release PR, defaults to using `chore${scope}: release${component} ${version}`. |
| `changelog-path` | configure alternate path for `CHANGELOG.md`. Default `CHANGELOG.md` |
| `github-api-url` | configure github API URL. Default `https://api.github.com` |

| output | description |
|:---:|---|
Expand Down
3 changes: 2 additions & 1 deletion index.js
Expand Up @@ -7,6 +7,7 @@ const MANIFEST_COMMANDS = ['manifest', 'manifest-pr']
const RELEASE_LABEL = 'autorelease: pending'
const GITHUB_RELEASE_COMMAND = 'github-release'
const GITHUB_RELEASE_PR_COMMAND = 'release-pr'
const GITHUB_API_URL = 'https://api.github.com'

function getBooleanInput (input) {
const trueValue = ['true', 'True', 'TRUE', 'yes', 'Yes', 'YES', 'y', 'Y', 'on', 'On', 'ON']
Expand All @@ -22,7 +23,7 @@ function getGitHubInput () {
fork: getBooleanInput('fork'),
defaultBranch: core.getInput('default-branch') || undefined,
repoUrl: process.env.GITHUB_REPOSITORY,
apiUrl: 'https://api.github.com',
apiUrl: core.getInput('github-api-url') || GITHUB_API_URL,
token: core.getInput('token', { required: true })
}
}
Expand Down

0 comments on commit fd7f2ff

Please sign in to comment.