diff --git a/docs/features/software-templates/writing-custom-actions.md b/docs/features/software-templates/writing-custom-actions.md index 8cfc5464f2..0006a52ab2 100644 --- a/docs/features/software-templates/writing-custom-actions.md +++ b/docs/features/software-templates/writing-custom-actions.md @@ -263,14 +263,17 @@ 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?.('create.projects', 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, + }; + }, }); ```