Merge pull request #25946 from RoadieHQ/adds-commit-message

adds ability to configure the commit message when initializating a repo
This commit is contained in:
Ben Lambert
2024-08-13 09:11:43 +02:00
committed by GitHub
3 changed files with 16 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder-backend-module-bitbucket-cloud': patch
---
Add ability to set the initial commit message when initializing a repository using the scaffolder action.
@@ -36,6 +36,7 @@ export function createPublishBitbucketCloudAction(options: {
description?: string | undefined;
defaultBranch?: string | undefined;
repoVisibility?: 'private' | 'public' | undefined;
gitCommitMessage?: string | undefined;
sourcePath?: string | undefined;
token?: string | undefined;
},
@@ -111,6 +111,7 @@ export function createPublishBitbucketCloudAction(options: {
description?: string;
defaultBranch?: string;
repoVisibility?: 'private' | 'public';
gitCommitMessage?: string;
sourcePath?: string;
token?: string;
}>({
@@ -141,6 +142,11 @@ export function createPublishBitbucketCloudAction(options: {
type: 'string',
description: `Sets the default branch on the repository. The default value is 'master'`,
},
gitCommitMessage: {
title: 'Git Commit Message',
type: 'string',
description: `Sets the commit message on the repository. The default value is 'initial commit'`,
},
sourcePath: {
title: 'Source Path',
description:
@@ -178,6 +184,7 @@ export function createPublishBitbucketCloudAction(options: {
repoUrl,
description,
defaultBranch = 'master',
gitCommitMessage,
repoVisibility = 'private',
} = ctx.input;
@@ -256,9 +263,9 @@ export function createPublishBitbucketCloudAction(options: {
auth,
defaultBranch,
logger: ctx.logger,
commitMessage: config.getOptionalString(
'scaffolder.defaultCommitMessage',
),
commitMessage:
gitCommitMessage ||
config.getOptionalString('scaffolder.defaultCommitMessage'),
gitAuthorInfo,
});