From 0d20dc097293eaa651a3eaf17e9db3a8c06afb81 Mon Sep 17 00:00:00 2001 From: Rachael Sewell Date: Mon, 31 Jan 2022 15:50:11 -0800 Subject: [PATCH 1/2] remove unused variables (#24847) * remove unused variables * moving label to center * update span to h3 Co-authored-by: Grace Park --- components/release-notes/PatchNotes.tsx | 52 ++----------------------- 1 file changed, 4 insertions(+), 48 deletions(-) diff --git a/components/release-notes/PatchNotes.tsx b/components/release-notes/PatchNotes.tsx index a1239ca3f0..35308674f0 100644 --- a/components/release-notes/PatchNotes.tsx +++ b/components/release-notes/PatchNotes.tsx @@ -16,26 +16,6 @@ const SectionToLabelMap: Record = { backups: 'Backups', } -const LabelColorMap = { - features: 'color-bg-success-emphasis', - bugs: 'color-bg-attention-emphasis', - known_issues: 'color-bg-accent-emphasis', - security_fixes: 'color-bg-sponsors-emphasis', - changes: 'color-bg-success-emphasis', - deprecations: 'color-bg-done-emphasis', - backups: 'color-bg-severe-emphasis', -} - -const HeadingColorMap = { - features: 'color-fg-success', - bugs: 'color-fg-attention', - known_issues: 'color-fg-accent', - security_fixes: 'color-fg-sponsors', - changes: 'color-fg-success', - deprecations: 'color-fg-done', - backups: 'color-fg-severe', -} - type Props = { patch: ReleaseNotePatch withReleaseNoteLabel?: boolean @@ -45,32 +25,17 @@ export function PatchNotes({ patch, withReleaseNoteLabel }: Props) { <> {Object.entries(patch.sections).map(([key, sectionItems], i, arr) => { const isLast = i === arr.length - 1 - const primaryLabelColor = - LabelColorMap[key as keyof typeof LabelColorMap] || LabelColorMap.features - const primaryHeadingColor = - HeadingColorMap[key as keyof typeof HeadingColorMap] || HeadingColorMap.features return (
- {withReleaseNoteLabel && ( -
- - {SectionToLabelMap[key] || 'INVALID SECTION'} - -
- )}
    +

    {SectionToLabelMap[key] || 'INVALID SECTION'}

    {sectionItems.map((item) => { if (typeof item === 'string') { return
  • @@ -79,17 +44,8 @@ export function PatchNotes({ patch, withReleaseNoteLabel }: Props) { const slug = item.heading ? slugger.slug(item.heading) : '' return ( -

    - - {item.heading} - +

    + {item.heading}

    {item.notes.map((note) => { return ( From 93591838899a537c56ce3fe1ee34daf50785fa05 Mon Sep 17 00:00:00 2001 From: Robert Sese Date: Mon, 31 Jan 2022 17:59:14 -0600 Subject: [PATCH 2/2] openapi-decorate.yml workflow fix: checkout head ref for add-and-commit action (#24814) * Checkout head ref for add-and-commit action * Add comment about why we specify the head ref --- .github/workflows/openapi-decorate.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/openapi-decorate.yml b/.github/workflows/openapi-decorate.yml index 2bbc0e43b0..089dcb52ae 100644 --- a/.github/workflows/openapi-decorate.yml +++ b/.github/workflows/openapi-decorate.yml @@ -32,6 +32,11 @@ jobs: - name: Checkout repository code uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 + with: + # actions/checkout by default will leave you in a detached head state + # so we need to specify the PR head ref explicitly since we're making + # changes that we want to commit to the branch. + ref: ${{ github.event.pull_request.head.ref }} - name: Setup node uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561