diff --git a/docs/features/software-templates/writing-custom-actions.md b/docs/features/software-templates/writing-custom-actions.md index 1eb331f7b9..07734418cc 100644 --- a/docs/features/software-templates/writing-custom-actions.md +++ b/docs/features/software-templates/writing-custom-actions.md @@ -263,15 +263,18 @@ Idempotent action could be achieved via the usage of checkpoints. Example: ```ts title="plugins/my-company-scaffolder-actions-plugin/src/vendor/my-custom-action.ts" -const res = await ctx.checkpoint?.({key: 'create.projects', fn: async () => { - const projectStgId = createStagingProjectId(); - const projectProId = createProductionProjectId(); +const res = await ctx.checkpoint?.({ + key: 'create.projects', + fn: async () => { + const projectStgId = createStagingProjectId(); + const projectProId = createProductionProjectId(); - return { - projectStgId, - projectProId, - }; -}}); + return { + projectStgId, + projectProId, + }; + }, +}); ``` You have to define the unique key in scope of the scaffolder task for your checkpoint. During the execution task engine