From b40159ff3a2b73782ca240eb1e1039bca966b757 Mon Sep 17 00:00:00 2001 From: Mikko Korhonen Date: Fri, 14 Jan 2022 09:50:22 +0200 Subject: [PATCH] chore(catalog-import): update README with relevant information how to customzie layout Obsolete instructions were used, updated with up-to-date information from changelog https://github.com/backstage/backstage/blob/master/plugins/catalog-import/CHANGELOG.md#minor-changes-1 Signed-off-by: Mikko Korhonen --- plugins/catalog-import/README.md | 61 ++++++++++++++++---------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/plugins/catalog-import/README.md b/plugins/catalog-import/README.md index bad48a8486..f492619690 100644 --- a/plugins/catalog-import/README.md +++ b/plugins/catalog-import/README.md @@ -35,41 +35,42 @@ import { CatalogImportPage } from '@backstage/plugin-catalog-import'; ## Customizations -### Disable the creation of Pull Requests +A custom layout can be passed to the import page, as it's already +supported by the search page. If no custom layout is passed, the default layout +is used. -The pull request feature can be disabled by options that are passed to the `CatalogImportPage`: +```typescript +}> + +
+ + + + Start tracking your component in Backstage by adding it to the + software catalog. + + -```tsx -// packages/app/src/App.tsx + + + Hello World + -} -/> + + + + + + + ``` -### Customize the title and body of the Pull Request - -The pull request form is filled with a default title and body. -This can be configured by options that are passed to the `CatalogImportPage`: - -```tsx -// packages/app/src/App.tsx - - ({ - title: 'My title', - body: 'My **markdown** body', - }), - }} - /> - } -/> -``` +Previously it was possible to disable and customize the automatic pull request +feature by passing options to `` (`pullRequest.disable` and +`pullRequest.preparePullRequest`). This functionality is moved to the +`CatalogImportApi` which now provides an optional `preparePullRequest()` +function. The function can either be overridden to generate a different content +for the pull request, or removed to disable this feature. ## Development