Skip to content

Commit

Permalink
chore: pretty :nails:
Browse files Browse the repository at this point in the history
Signed-off-by: blam <[email protected]>
  • Loading branch information
benjdlambert committed Jan 28, 2025
1 parent 203783b commit 91af968
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions docs/features/software-templates/writing-custom-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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();

return {
projectStgId,
projectProId,
};
}});
const res = await ctx.checkpoint?.({
key: 'create.projects',
fn: async () => {
const projectStgId = createStagingProjectId();
const projectProId = createProductionProjectId();

return {
projectStgId,
projectProId,
};
},
});
```

You have to define the unique key in scope of the scaffolder task for your checkpoint. During the execution task engine
Expand Down

0 comments on commit 91af968

Please sign in to comment.