From ac4eeb710259b9216c19e48ee5fb3faa7aa7c122 Mon Sep 17 00:00:00 2001 From: Anthony Ikeda Date: Tue, 9 Nov 2021 11:07:14 -0800 Subject: [PATCH] More consistent formatting of the Note block Signed-off-by: Anthony Ikeda --- .../writing-custom-actions.md | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/docs/features/software-templates/writing-custom-actions.md b/docs/features/software-templates/writing-custom-actions.md index 4663b2abb6..d3dff2b4e8 100644 --- a/docs/features/software-templates/writing-custom-actions.md +++ b/docs/features/software-templates/writing-custom-actions.md @@ -10,9 +10,40 @@ by writing custom actions which can be used along side our > 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) ### Writing your Custom Action