feat: update api report

Signed-off-by: Ilya Katlinski <ilya.katlinsky@gmail.com>
This commit is contained in:
Ilya Katlinski
2023-10-06 09:28:15 +02:00
parent 62a64275b3
commit b847ef3a1d
3 changed files with 34 additions and 51 deletions
+10 -1
View File
@@ -679,7 +679,16 @@ export function createPublishGitlabAction(options: {
gitAuthorEmail?: string | undefined;
setUserAsOwner?: boolean | undefined;
topics?: string[] | undefined;
settings?: Record<string, any> | undefined;
settings?:
| {
path?: string | undefined;
auto_devops_enabled?: boolean | undefined;
ci_config_path?: string | undefined;
description?: string | undefined;
topics?: string[] | undefined;
visibility?: 'internal' | 'private' | 'public' | undefined;
}
| undefined;
branches?:
| {
name: string;
@@ -22,11 +22,6 @@ import { initRepoAndPush, printGitlabError } from '../helpers';
import { getRepoSourceDirectory, parseRepoUrl } from './util';
import { Config } from '@backstage/config';
import { examples } from './gitlab.examples';
import {
GitlabBranchSettings,
GitlabProjectSettings,
GitlabProjectVariableSettings,
} from './gitlab.types';
/**
* Creates a new action that initializes a git repository of the content in the workspace
@@ -53,9 +48,30 @@ export function createPublishGitlabAction(options: {
setUserAsOwner?: boolean;
/** @deprecated in favour of settings.topics field */
topics?: string[];
settings?: GitlabProjectSettings;
branches?: Array<GitlabBranchSettings>;
projectVariables?: Array<GitlabProjectVariableSettings>;
settings?: {
path?: string;
auto_devops_enabled?: boolean;
ci_config_path?: string;
description?: string;
topics?: string[];
visibility?: 'private' | 'internal' | 'public';
};
branches?: Array<{
name: string;
protect?: boolean;
create?: boolean;
ref?: string;
}>;
projectVariables?: Array<{
key: string;
value: string;
description?: string;
variable_type?: string;
protected?: boolean;
masked?: boolean;
raw?: boolean;
environment_scope?: string;
}>;
}>({
id: 'publish:gitlab',
description:
@@ -1,42 +0,0 @@
/*
* Copyright 2021 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export type GitlabProjectSettings = {
path?: string;
auto_devops_enabled?: boolean;
ci_config_path?: string;
description?: string;
topics?: string[];
visibility?: 'private' | 'internal' | 'public';
};
export type GitlabBranchSettings = {
name: string;
protect?: boolean;
create?: boolean;
ref?: string;
};
export type GitlabProjectVariableSettings = {
key: string;
value: string;
description?: string;
variable_type?: string;
protected?: boolean;
masked?: boolean;
raw?: boolean;
environment_scope?: string;
};