diff --git a/.changeset/famous-dryers-protect.md b/.changeset/famous-dryers-protect.md index f1da5fc511..b015a562aa 100644 --- a/.changeset/famous-dryers-protect.md +++ b/.changeset/famous-dryers-protect.md @@ -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. diff --git a/.changeset/wise-students-tell.md b/.changeset/wise-students-tell.md deleted file mode 100644 index 12acb5f892..0000000000 --- a/.changeset/wise-students-tell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-node': patch ---- - -Add task id to ActionContext diff --git a/plugins/scaffolder-node/report.api.md b/plugins/scaffolder-node/report.api.md index a8f7b4da67..1141f0ada0 100644 --- a/plugins/scaffolder-node/report.api.md +++ b/plugins/scaffolder-node/report.api.md @@ -41,7 +41,7 @@ export type ActionContext< ): void; createTemporaryDirectory(): Promise; getInitiatorCredentials(): Promise; - task?: { + task: { id: string; }; templateInfo?: TemplateInfo;