adds ability to configure the commit message when initializating a repo

Signed-off-by: Brian Fletcher <brian@roadie.io>
This commit is contained in:
Brian Fletcher
2024-08-08 14:08:23 +01:00
parent 963d677945
commit d57967cbd3
2 changed files with 15 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder-backend-module-bitbucket-cloud': patch
---
Add abilty to set the initial commit message when initializing a repository using the scaffolder action.
@@ -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,
});