feat: support for skip-labeling parameter for GitHub action (#1066)

Adds support and documentation for the skipLabeling option when running
release-please from GitHub Actions.

This option in the config are ignored when running in
release-please-action, and only honored when you pass it as an option
via a command line. This PR adds the same support to GitHub action.

---------

Co-authored-by: Jeff Ching <chingor@google.com>
This commit is contained in:
Ruslan Gainutdinov
2025-03-07 20:45:07 +02:00
committed by GitHub
parent 35ed13664e
commit fb7f385da2
3 changed files with 10 additions and 1 deletions

View File

@@ -83,6 +83,7 @@ steps:
| `proxy-server` | Configure a proxy servier in the form of `<host>:<port>` e.g. `proxy-host.com:8080` | | `proxy-server` | Configure a proxy servier in the form of `<host>:<port>` e.g. `proxy-host.com:8080` |
| `skip-github-release` | If `true`, do not attempt to create releases. This is useful if splitting release tagging from PR creation. | | `skip-github-release` | If `true`, do not attempt to create releases. This is useful if splitting release tagging from PR creation. |
| `skip-github-pull-request` | If `true`, do not attempt to create release pull requests. This is useful if splitting release tagging from PR creation. | | `skip-github-pull-request` | If `true`, do not attempt to create release pull requests. This is useful if splitting release tagging from PR creation. |
| `skip-labeling` | If `true`, do not attempt to label the PR. |
## GitHub Credentials ## GitHub Credentials

View File

@@ -58,6 +58,10 @@ inputs:
description: 'if set to true, then do not try to open pull requests' description: 'if set to true, then do not try to open pull requests'
required: false required: false
default: false default: false
skip-labeling:
description: 'if set to true, then do not try to label the PR'
required: false
default: false
changelog-host: changelog-host:
description: 'The proto://host where commits live. Default `https://github.com`' description: 'The proto://host where commits live. Default `https://github.com`'
required: false required: false

View File

@@ -39,6 +39,7 @@ interface ActionInputs {
targetBranch?: string; targetBranch?: string;
skipGitHubRelease?: boolean; skipGitHubRelease?: boolean;
skipGitHubPullRequest?: boolean; skipGitHubPullRequest?: boolean;
skipLabeling?: boolean;
fork?: boolean; fork?: boolean;
includeComponentInTag?: boolean; includeComponentInTag?: boolean;
changelogHost: string; changelogHost: string;
@@ -60,6 +61,7 @@ function parseInputs(): ActionInputs {
proxyServer: getOptionalInput('proxy-server'), proxyServer: getOptionalInput('proxy-server'),
skipGitHubRelease: getOptionalBooleanInput('skip-github-release'), skipGitHubRelease: getOptionalBooleanInput('skip-github-release'),
skipGitHubPullRequest: getOptionalBooleanInput('skip-github-pull-request'), skipGitHubPullRequest: getOptionalBooleanInput('skip-github-pull-request'),
skipLabeling: getOptionalBooleanInput('skip-labeling'),
fork: getOptionalBooleanInput('fork'), fork: getOptionalBooleanInput('fork'),
includeComponentInTag: getOptionalBooleanInput('include-component-in-tag'), includeComponentInTag: getOptionalBooleanInput('include-component-in-tag'),
changelogHost: core.getInput('changelog-host') || DEFAULT_GITHUB_SERVER_URL, changelogHost: core.getInput('changelog-host') || DEFAULT_GITHUB_SERVER_URL,
@@ -95,13 +97,15 @@ function loadOrBuildManifest(
}, },
{ {
fork: inputs.fork, fork: inputs.fork,
skipLabeling: inputs.skipLabeling,
}, },
inputs.path inputs.path
); );
} }
const manifestOverrides = inputs.fork const manifestOverrides = inputs.fork || inputs.skipLabeling
? { ? {
fork: inputs.fork, fork: inputs.fork,
skipLabeling: inputs.skipLabeling,
} }
: {}; : {};
core.debug('Loading manifest from config file'); core.debug('Loading manifest from config file');