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

Commit 863b06f

Browse files
eliw00dchingor13
andauthoredMar 11, 2024
feat: add changelog-host input to action.yml (#948)
This was originally part of [3.3.0](https://github.com/google-github-actions/release-please-action/blob/main/CHANGELOG.md#330-2022-08-10) (and fixed in [3.4.1](https://github.com/google-github-actions/release-please-action/blob/main/CHANGELOG.md#341-2022-08-24) to default to `github.server_url`). However, it was not part of 4.0.0. Without this input, you have to provide both config and manifest files in order to set the `changelog-host` option. With this input, you can simply provide `release-type` and `changelog-host` without the need for config and manifest files. Also, since it defaults to `github.server_url`, most users will not even have to set it. Signed-off-by: Paavo Bennett <paavobennettis@gmail.com> Co-authored-by: Jeff Ching <chingor@google.com>
1 parent 078b9b8 commit 863b06f

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed
 

‎action.yml

+4
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ inputs:
5858
description: 'if set to true, then do not try to open pull requests'
5959
required: false
6060
default: false
61+
changelog-host:
62+
description: 'The proto://host where commits live. Default `https://github.com`'
63+
required: false
64+
default: ${{ github.server_url }}
6165
runs:
6266
using: 'node20'
6367
main: 'dist/index.js'

‎src/index.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const DEFAULT_CONFIG_FILE = 'release-please-config.json';
1919
const DEFAULT_MANIFEST_FILE = '.release-please-manifest.json';
2020
const DEFAULT_GITHUB_API_URL = 'https://api.github.com';
2121
const DEFAULT_GITHUB_GRAPHQL_URL = 'https://api.github.com';
22+
const DEFAULT_GITHUB_SERVER_URL = 'https://github.com';
2223

2324
interface Proxy {
2425
host: string;
@@ -40,6 +41,7 @@ interface ActionInputs {
4041
skipGitHubPullRequest?: boolean;
4142
fork?: boolean;
4243
includeComponentInTag?: boolean;
44+
changelogHost: string;
4345
}
4446

4547
function parseInputs(): ActionInputs {
@@ -60,6 +62,7 @@ function parseInputs(): ActionInputs {
6062
skipGitHubPullRequest: getOptionalBooleanInput('skip-github-pull-request'),
6163
fork: getOptionalBooleanInput('fork'),
6264
includeComponentInTag: getOptionalBooleanInput('include-component-in-tag'),
65+
changelogHost: core.getInput('changelog-host') || DEFAULT_GITHUB_SERVER_URL,
6366
};
6467
return inputs;
6568
}
@@ -88,6 +91,7 @@ function loadOrBuildManifest(
8891
{
8992
releaseType: inputs.releaseType,
9093
includeComponentInTag: inputs.includeComponentInTag,
94+
changelogHost: inputs.changelogHost,
9195
},
9296
{
9397
fork: inputs.fork,
@@ -205,4 +209,4 @@ if (require.main === module) {
205209
main().catch(err => {
206210
core.setFailed(`release-please failed: ${err.message}`)
207211
})
208-
}
212+
}

0 commit comments

Comments
 (0)
This repository has been archived.