1
0
mirror of https://github.com/joaquinjsb/gitea-release-please-action synced 2026-05-08 01:31:15 +02:00

feat(input): add github API URL configuration for input (#368)

This commit is contained in:
Neo Hsu
2021-09-24 05:37:49 +08:00
committed by GitHub
parent 56e7d78b8a
commit fd7f2fff26
2 changed files with 3 additions and 1 deletions

View File

@@ -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 |
|:---:|---|

View File

@@ -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']
@@ -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 })
}
}