Add description to scaffolder actions
Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
@@ -31,6 +31,7 @@ export function createCatalogRegisterAction(options: {
|
||||
| { repoContentsUrl: string; catalogInfoPath?: string }
|
||||
>({
|
||||
id: 'catalog:register',
|
||||
description: 'Registers entity in the software catalog.',
|
||||
schema: {
|
||||
input: {
|
||||
oneOf: [
|
||||
|
||||
@@ -38,6 +38,8 @@ export function createFetchCookiecutterAction(options: {
|
||||
values: JsonObject;
|
||||
}>({
|
||||
id: 'fetch:cookiecutter',
|
||||
description:
|
||||
"Downloads template from 'url' and templates with cookiecutter",
|
||||
schema: {
|
||||
input: {
|
||||
type: 'object',
|
||||
|
||||
@@ -28,6 +28,8 @@ export function createFetchPlainAction(options: {
|
||||
|
||||
return createTemplateAction<{ url: string; targetPath?: string }>({
|
||||
id: 'fetch:plain',
|
||||
description:
|
||||
"Downloads content and places it in the workspacePath or optionally in a subdirectory specified by the 'targetPath' input option.",
|
||||
schema: {
|
||||
input: {
|
||||
type: 'object',
|
||||
|
||||
@@ -32,6 +32,8 @@ export function createPublishAzureAction(options: {
|
||||
description?: string;
|
||||
}>({
|
||||
id: 'publish:azure',
|
||||
description:
|
||||
'Initializes a git repository of contents in workspacePath and publishes to Azure.',
|
||||
schema: {
|
||||
input: {
|
||||
type: 'object',
|
||||
|
||||
@@ -167,6 +167,8 @@ export function createPublishBitbucketAction(options: {
|
||||
repoVisibility: 'private' | 'public';
|
||||
}>({
|
||||
id: 'publish:bitbucket',
|
||||
description:
|
||||
'Initializes a git repository of contents in workspacePath and publishes to Bitbucket.',
|
||||
schema: {
|
||||
input: {
|
||||
type: 'object',
|
||||
|
||||
@@ -43,6 +43,8 @@ export function createPublishGithubAction(options: {
|
||||
repoVisibility: 'private' | 'internal' | 'public';
|
||||
}>({
|
||||
id: 'publish:github',
|
||||
description:
|
||||
'Initializes a git repository of contents in workspacePath and publishes to GitHub.',
|
||||
schema: {
|
||||
input: {
|
||||
type: 'object',
|
||||
|
||||
@@ -31,6 +31,8 @@ export function createPublishGitlabAction(options: {
|
||||
repoVisibility: 'private' | 'internal' | 'public';
|
||||
}>({
|
||||
id: 'publish:gitlab',
|
||||
description:
|
||||
'Initializes a git repository of contents in workspacePath and publishes to GitLab.',
|
||||
schema: {
|
||||
input: {
|
||||
type: 'object',
|
||||
|
||||
@@ -44,6 +44,7 @@ export type ActionContext<Input extends InputBase> = {
|
||||
|
||||
export type TemplateAction<Input extends InputBase> = {
|
||||
id: string;
|
||||
description?: string;
|
||||
schema?: {
|
||||
input?: Schema;
|
||||
output?: Schema;
|
||||
|
||||
@@ -351,6 +351,7 @@ export async function createRouter(
|
||||
const actionsList = actionRegistry.list().map(action => {
|
||||
return {
|
||||
id: action.id,
|
||||
description: action.description,
|
||||
schema: action.schema,
|
||||
};
|
||||
});
|
||||
|
||||
@@ -58,6 +58,7 @@ export type ScaffolderTask = {
|
||||
|
||||
export type ListActionsResponse = Array<{
|
||||
id: string;
|
||||
description?: string;
|
||||
schema?: {
|
||||
input?: JSONSchema;
|
||||
output?: JSONSchema;
|
||||
|
||||
Reference in New Issue
Block a user