mirror of
https://github.com/joaquinjsb/gitea-release-please-action
synced 2026-05-12 18:21:36 +02:00
feat(input): add github API URL configuration for input (#368)
This commit is contained in:
@@ -60,6 +60,7 @@ Automate releases with Conventional Commit Messages.
|
|||||||
| `default-branch` | branch to open pull release PR against (detected by default) |
|
| `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}`. |
|
| `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` |
|
| `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 |
|
| output | description |
|
||||||
|:---:|---|
|
|:---:|---|
|
||||||
|
|||||||
3
index.js
3
index.js
@@ -7,6 +7,7 @@ const MANIFEST_COMMANDS = ['manifest', 'manifest-pr']
|
|||||||
const RELEASE_LABEL = 'autorelease: pending'
|
const RELEASE_LABEL = 'autorelease: pending'
|
||||||
const GITHUB_RELEASE_COMMAND = 'github-release'
|
const GITHUB_RELEASE_COMMAND = 'github-release'
|
||||||
const GITHUB_RELEASE_PR_COMMAND = 'release-pr'
|
const GITHUB_RELEASE_PR_COMMAND = 'release-pr'
|
||||||
|
const GITHUB_API_URL = 'https://api.github.com'
|
||||||
|
|
||||||
function getBooleanInput (input) {
|
function getBooleanInput (input) {
|
||||||
const trueValue = ['true', 'True', 'TRUE', 'yes', 'Yes', 'YES', 'y', 'Y', 'on', 'On', 'ON']
|
const trueValue = ['true', 'True', 'TRUE', 'yes', 'Yes', 'YES', 'y', 'Y', 'on', 'On', 'ON']
|
||||||
@@ -22,7 +23,7 @@ function getGitHubInput () {
|
|||||||
fork: getBooleanInput('fork'),
|
fork: getBooleanInput('fork'),
|
||||||
defaultBranch: core.getInput('default-branch') || undefined,
|
defaultBranch: core.getInput('default-branch') || undefined,
|
||||||
repoUrl: process.env.GITHUB_REPOSITORY,
|
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 })
|
token: core.getInput('token', { required: true })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user