make task not optional in ActionContext

Signed-off-by: Fabio Vincenzi <fabio.vincenzi2001@gmail.com>
This commit is contained in:
Fabio Vincenzi
2024-12-13 18:22:14 +01:00
parent ce09b0ccf6
commit 51bf762181
3 changed files with 3 additions and 7 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
---
'@backstage/plugin-scaffolder-backend': minor
'@backstage/plugin-scaffolder-node': patch
---
New `taskId` Context Variable in Scaffolder Templates
Added the ability to use `${{ context.task.id }}` in nunjucks templating, as well as `ctx.task.id` in actions to get the current task ID.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder-node': patch
---
Add task id to ActionContext
+1 -1
View File
@@ -41,7 +41,7 @@ export type ActionContext<
): void;
createTemporaryDirectory(): Promise<string>;
getInitiatorCredentials(): Promise<BackstageCredentials>;
task?: {
task: {
id: string;
};
templateInfo?: TemplateInfo;