chore: migrate to new actions format

Signed-off-by: benjdlambert <ben@blam.sh>

Signed-off-by: benjdlambert <ben@blam.sh>
This commit is contained in:
benjdlambert
2025-06-04 08:19:22 +02:00
parent a5796937ae
commit 6c6fb4a73b
3 changed files with 38 additions and 38 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder-backend-module-sentry': patch
---
Migrate to new actions format
@@ -5,7 +5,6 @@
```ts
import { BackendFeature } from '@backstage/backend-plugin-api';
import { Config } from '@backstage/config';
import { JsonObject } from '@backstage/types';
import { TemplateAction } from '@backstage/plugin-scaffolder-node';
// @public
@@ -16,11 +15,13 @@ export function createSentryCreateProjectAction(options: {
organizationSlug: string;
teamSlug: string;
name: string;
slug?: string;
authToken?: string;
slug?: string | undefined;
authToken?: string | undefined;
},
JsonObject,
'v1'
{
[x: string]: any;
},
'v2'
>;
// @public
@@ -31,42 +31,36 @@ import { Config } from '@backstage/config';
export function createSentryCreateProjectAction(options: { config: Config }) {
const { config } = options;
return createTemplateAction<{
organizationSlug: string;
teamSlug: string;
name: string;
slug?: string;
authToken?: string;
}>({
return createTemplateAction({
id: 'sentry:project:create',
schema: {
input: {
required: ['organizationSlug', 'teamSlug', 'name'],
type: 'object',
properties: {
organizationSlug: {
title: 'The slug of the organization the team belongs to',
type: 'string',
},
teamSlug: {
title: 'The slug of the team to create a new project for',
type: 'string',
},
name: {
title: 'The name for the new project',
type: 'string',
},
slug: {
title:
'Optional slug for the new project. If not provided a slug is generated from the name',
type: 'string',
},
authToken: {
title:
'authenticate via bearer auth token. Requires scope: project:write',
type: 'string',
},
},
organizationSlug: z =>
z.string({
description: 'The slug of the organization the team belongs to',
}),
teamSlug: z =>
z.string({
description: 'The slug of the team to create a new project for',
}),
name: z =>
z.string({
description: 'The name for the new project',
}),
slug: z =>
z
.string({
description:
'Optional slug for the new project. If not provided a slug is generated from the name',
})
.optional(),
authToken: z =>
z
.string({
description:
'authenticate via bearer auth token. Requires scope: project:write',
})
.optional(),
},
},
async handler(ctx) {