Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.

Commit fd7f2ff

Browse files
authored
feat(input): add github API URL configuration for input (#368)
1 parent 56e7d78 commit fd7f2ff

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Automate releases with Conventional Commit Messages.
6060
| `default-branch` | branch to open pull release PR against (detected by default) |
6161
| `pull-request-title-pattern` | title pattern used to make release PR, defaults to using `chore${scope}: release${component} ${version}`. |
6262
| `changelog-path` | configure alternate path for `CHANGELOG.md`. Default `CHANGELOG.md` |
63+
| `github-api-url` | configure github API URL. Default `https://api.github.com` |
6364

6465
| output | description |
6566
|:---:|---|

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const MANIFEST_COMMANDS = ['manifest', 'manifest-pr']
77
const RELEASE_LABEL = 'autorelease: pending'
88
const GITHUB_RELEASE_COMMAND = 'github-release'
99
const GITHUB_RELEASE_PR_COMMAND = 'release-pr'
10+
const GITHUB_API_URL = 'https://api.github.com'
1011

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

0 commit comments

Comments
 (0)