From 58524588448c66b59e3fc2a3a306040befc0abb2 Mon Sep 17 00:00:00 2001 From: Brian Phillips <28457+brianphillips@users.noreply.github.com> Date: Wed, 24 May 2023 09:11:24 -0500 Subject: [PATCH] Add changesets and API reports Signed-off-by: Brian Phillips <28457+brianphillips@users.noreply.github.com> --- .changeset/nine-bags-dream.md | 5 +++++ .changeset/real-donuts-brush.md | 5 +++++ .changeset/strange-geese-argue.md | 5 +++++ plugins/adr-common/api-report.md | 11 +++++++++++ plugins/adr/api-report.md | 1 + 5 files changed, 27 insertions(+) create mode 100644 .changeset/nine-bags-dream.md create mode 100644 .changeset/real-donuts-brush.md create mode 100644 .changeset/strange-geese-argue.md diff --git a/.changeset/nine-bags-dream.md b/.changeset/nine-bags-dream.md new file mode 100644 index 0000000000..f0967775db --- /dev/null +++ b/.changeset/nine-bags-dream.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-adr': patch +--- + +Render table of front matter metadata when displaying MADR v3 formatted ADR diff --git a/.changeset/real-donuts-brush.md b/.changeset/real-donuts-brush.md new file mode 100644 index 0000000000..b6a875bd64 --- /dev/null +++ b/.changeset/real-donuts-brush.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-adr-backend': patch +--- + +Use front matter parser for MADR v3 formatted ADRs when indexing status/date diff --git a/.changeset/strange-geese-argue.md b/.changeset/strange-geese-argue.md new file mode 100644 index 0000000000..7be0886abb --- /dev/null +++ b/.changeset/strange-geese-argue.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-adr-common': patch +--- + +Add utility function for parsing MADR front matter diff --git a/plugins/adr-common/api-report.md b/plugins/adr-common/api-report.md index 0236b355a5..a36854f0e7 100644 --- a/plugins/adr-common/api-report.md +++ b/plugins/adr-common/api-report.md @@ -35,4 +35,15 @@ export const MADR_DATE_FORMAT = 'yyyy-MM-dd'; // @public export const madrFilePathFilter: AdrFilePathFilterFn; + +// @public +export interface ParsedMadr { + attributes: Record; + content: string; + date?: string; + status?: string; +} + +// @public +export const parseMadrWithFrontmatter: (content: string) => ParsedMadr; ``` diff --git a/plugins/adr/api-report.md b/plugins/adr/api-report.md index dceca2411c..4cec5047fc 100644 --- a/plugins/adr/api-report.md +++ b/plugins/adr/api-report.md @@ -80,6 +80,7 @@ export const AdrReader: { decorators: Readonly<{ createRewriteRelativeLinksDecorator(): AdrContentDecorator; createRewriteRelativeEmbedsDecorator(): AdrContentDecorator; + createFrontMatterFormatterDecorator(): AdrContentDecorator; }>; };