fix(default action) create -> auto
Signed-off-by: Yghore <yhgore@gmail.com>
This commit is contained in:
@@ -33,11 +33,11 @@ export const createGitlabIssueAction: (options: {
|
||||
projectId: number;
|
||||
labels?: string | undefined;
|
||||
description?: string | undefined;
|
||||
token?: string | undefined;
|
||||
weight?: number | undefined;
|
||||
token?: string | undefined;
|
||||
assignees?: number[] | undefined;
|
||||
confidential?: boolean | undefined;
|
||||
createdAt?: string | undefined;
|
||||
confidential?: boolean | undefined;
|
||||
milestoneId?: number | undefined;
|
||||
epicId?: number | undefined;
|
||||
dueDate?: string | undefined;
|
||||
@@ -61,8 +61,8 @@ export const createGitlabProjectAccessTokenAction: (options: {
|
||||
projectId: string | number;
|
||||
name?: string | undefined;
|
||||
token?: string | undefined;
|
||||
expiresAt?: string | undefined;
|
||||
scopes?: string[] | undefined;
|
||||
expiresAt?: string | undefined;
|
||||
accessLevel?: number | undefined;
|
||||
},
|
||||
{
|
||||
@@ -118,7 +118,7 @@ export const createGitlabRepoPushAction: (options: {
|
||||
sourcePath?: string | undefined;
|
||||
targetPath?: string | undefined;
|
||||
token?: string | undefined;
|
||||
commitAction?: 'update' | 'create' | 'delete' | undefined;
|
||||
commitAction?: 'update' | 'delete' | 'create' | undefined;
|
||||
},
|
||||
JsonObject
|
||||
>;
|
||||
@@ -193,7 +193,7 @@ export const createPublishGitlabMergeRequestAction: (options: {
|
||||
sourcePath?: string | undefined;
|
||||
targetPath?: string | undefined;
|
||||
token?: string | undefined;
|
||||
commitAction?: 'auto' | 'update' | 'create' | 'delete' | undefined;
|
||||
commitAction?: 'auto' | 'update' | 'delete' | 'create' | undefined;
|
||||
projectid?: string | undefined;
|
||||
removeSourceBranch?: boolean | undefined;
|
||||
assignee?: string | undefined;
|
||||
@@ -206,8 +206,8 @@ export const createTriggerGitlabPipelineAction: (options: {
|
||||
integrations: ScmIntegrationRegistry;
|
||||
}) => TemplateAction<
|
||||
{
|
||||
repoUrl: string;
|
||||
branch: string;
|
||||
repoUrl: string;
|
||||
projectId: number;
|
||||
tokenDescription: string;
|
||||
token?: string | undefined;
|
||||
@@ -229,8 +229,8 @@ export const editGitlabIssueAction: (options: {
|
||||
title?: string | undefined;
|
||||
labels?: string | undefined;
|
||||
description?: string | undefined;
|
||||
token?: string | undefined;
|
||||
weight?: number | undefined;
|
||||
token?: string | undefined;
|
||||
assignees?: number[] | undefined;
|
||||
addLabels?: string | undefined;
|
||||
confidential?: boolean | undefined;
|
||||
|
||||
@@ -33,13 +33,13 @@ function getFileAction(
|
||||
remoteFiles: Types.RepositoryTreeSchema[],
|
||||
defaultCommitAction: 'create' | 'delete' | 'update' | 'auto' | undefined,
|
||||
): 'create' | 'delete' | 'update' {
|
||||
if (defaultCommitAction === 'auto') {
|
||||
if (!defaultCommitAction || defaultCommitAction === 'auto') {
|
||||
return remoteFiles &&
|
||||
remoteFiles.some(remoteFile => remoteFile.path === file.path)
|
||||
? 'update'
|
||||
: 'create';
|
||||
}
|
||||
return defaultCommitAction ?? 'create';
|
||||
return defaultCommitAction;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -126,7 +126,7 @@ export const createPublishGitlabMergeRequestAction = (options: {
|
||||
type: 'string',
|
||||
enum: ['create', 'update', 'delete', 'auto'],
|
||||
description:
|
||||
'The action to be used for git commit. Defaults to create. "auto" is custom action provide by backstage, (automatic assign create or update action) /!\\ Use more api calls /!\\ *',
|
||||
'The action to be used for git commit. Defaults to auto. "auto" is custom action provide by backstage, (automatic assign create or update action) /!\\ Use more api calls /!\\ *',
|
||||
},
|
||||
removeSourceBranch: {
|
||||
title: 'Delete source branch',
|
||||
|
||||
@@ -312,7 +312,7 @@ export const createPublishGitlabMergeRequestAction: (options: {
|
||||
sourcePath?: string | undefined;
|
||||
targetPath?: string | undefined;
|
||||
token?: string | undefined;
|
||||
commitAction?: 'update' | 'delete' | 'create' | undefined;
|
||||
commitAction?: 'auto' | 'update' | 'delete' | 'create' | undefined;
|
||||
projectid?: string | undefined;
|
||||
removeSourceBranch?: boolean | undefined;
|
||||
assignee?: string | undefined;
|
||||
|
||||
Reference in New Issue
Block a user