From 69f06b7db5ee87498ae2dc9bba0047418b8875b3 Mon Sep 17 00:00:00 2001 From: Anthony Ikeda Date: Tue, 9 Nov 2021 11:58:58 -0800 Subject: [PATCH] Ran Prettier and reformatted the file Signed-off-by: Anthony Ikeda --- .../writing-custom-actions.md | 39 ++----------------- 1 file changed, 3 insertions(+), 36 deletions(-) diff --git a/docs/features/software-templates/writing-custom-actions.md b/docs/features/software-templates/writing-custom-actions.md index d3dff2b4e8..76bf9a4d66 100644 --- a/docs/features/software-templates/writing-custom-actions.md +++ b/docs/features/software-templates/writing-custom-actions.md @@ -8,42 +8,9 @@ If you're wanting to extend the functionality of the Scaffolder, you can do so by writing custom actions which can be used along side our [built-in actions](./builtin-actions.md). - -> Note: When adding custom actions, the actions array will **replace the built-in actions too**, -<<<<<<< HEAD -> so if you want to have those as well as your new one. -> See below to include `builtInActions` during registration of your action. - -======= -> so if you want to have those as well as your new one, you'll need to do the following: - -```ts -import { createBuiltinActions } from '@backstage/plugin-scaffolder-backend'; -import { ScmIntegrations } from '@backstage/integration'; - -const integrations = ScmIntegrations.fromConfig(config); - -const builtInActions = createBuiltinActions({ - containerRunner, - integrations, - config, - catalogClient, - reader, -}); - -const actions = [...builtInActions, createNewFileAction()]; - -return await createRouter({ - containerRunner, - logger, - config, - database, - catalogClient, - reader, - actions, -}); -``` ->>>>>>> a72c8bf39a (More consistent formatting of the Note block) +> Note: When adding custom actions, the actions array will **replace the +> built-in actions too**. To ensure you can continue to include he builtin +> actions, see below to include them during registration of your action. ### Writing your Custom Action