From 1986fcaa5cfce10692928daff198f6dd113caea1 Mon Sep 17 00:00:00 2001 From: Armando Belardo <11140328+armandobelardo@users.noreply.github.com> Date: Sun, 8 Sep 2024 12:08:25 -0400 Subject: [PATCH] chore(fern-bot): update formatting to appropriately render bullet contents (#1412) --- .github/workflows/invoke-fern-bot-update-spec.yml | 13 +++++++------ .../invoke-fern-bot-upgrade-generators.yml | 13 +++++++------ .../shared/updateGeneratorInternal.ts | 10 ++++++---- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/.github/workflows/invoke-fern-bot-update-spec.yml b/.github/workflows/invoke-fern-bot-update-spec.yml index c9b894338b..57ea34df3c 100644 --- a/.github/workflows/invoke-fern-bot-update-spec.yml +++ b/.github/workflows/invoke-fern-bot-update-spec.yml @@ -26,6 +26,7 @@ jobs: GITHUB_APP_CLIENT_ID: ${{ secrets.FERN_BOT_DEV_GITHUB_APP_CLIENT_ID }} GITHUB_APP_CLIENT_SECRET: ${{ secrets.FERN_BOT_DEV_GITHUB_APP_CLIENT_SECRET }} GITHUB_APP_WEBHOOK_SECRET: ${{ secrets.FERN_BOT_DEV_GITHUB_APP_WEBHOOK_SECRET }} + FERNIE_SLACK_APP_TOKEN: ${{ secrets.FERNIE_SLACK_APP_TOKEN }} DEFAULT_VENUS_ORIGIN: "https://venus-dev2.buildwithfern.com" DEFAULT_FDR_ORIGIN: "https://registry-dev2.buildwithfern.com" CO_API_KEY: ${{ secrets.DEV_CO_API_KEY }} @@ -33,13 +34,13 @@ jobs: CI: false steps: - uses: actions/checkout@v4 - + - name: 📥 Install uses: ./.github/actions/install - name: Compile - run: pnpm compile - + run: pnpm compile + - name: 🚀 serverless deploy run: | pnpm --filter "@fern-platform/fern-bot" install @@ -64,13 +65,13 @@ jobs: CI: false steps: - uses: actions/checkout@v4 - + - name: 📥 Install uses: ./.github/actions/install - name: Compile - run: pnpm compile - + run: pnpm compile + - name: 🚀 serverless deploy run: | pnpm --filter "@fern-platform/fern-bot" install diff --git a/.github/workflows/invoke-fern-bot-upgrade-generators.yml b/.github/workflows/invoke-fern-bot-upgrade-generators.yml index d61129b1b8..1c95b5cdcf 100644 --- a/.github/workflows/invoke-fern-bot-upgrade-generators.yml +++ b/.github/workflows/invoke-fern-bot-upgrade-generators.yml @@ -26,6 +26,7 @@ jobs: GITHUB_APP_CLIENT_ID: ${{ secrets.FERN_BOT_DEV_GITHUB_APP_CLIENT_ID }} GITHUB_APP_CLIENT_SECRET: ${{ secrets.FERN_BOT_DEV_GITHUB_APP_CLIENT_SECRET }} GITHUB_APP_WEBHOOK_SECRET: ${{ secrets.FERN_BOT_DEV_GITHUB_APP_WEBHOOK_SECRET }} + FERNIE_SLACK_APP_TOKEN: ${{ secrets.FERNIE_SLACK_APP_TOKEN }} DEFAULT_VENUS_ORIGIN: "https://venus-dev2.buildwithfern.com" DEFAULT_FDR_ORIGIN: "https://registry-dev2.buildwithfern.com" CO_API_KEY: ${{ secrets.DEV_CO_API_KEY }} @@ -33,13 +34,13 @@ jobs: CI: false steps: - uses: actions/checkout@v4 - + - name: 📥 Install uses: ./.github/actions/install - name: Compile - run: pnpm compile - + run: pnpm compile + - name: 🚀 serverless deploy run: | pnpm --filter "@fern-platform/fern-bot" install @@ -64,13 +65,13 @@ jobs: CI: false steps: - uses: actions/checkout@v4 - + - name: 📥 Install uses: ./.github/actions/install - name: Compile - run: pnpm compile - + run: pnpm compile + - name: 🚀 serverless deploy run: | pnpm --filter "@fern-platform/fern-bot" install diff --git a/servers/fern-bot/src/functions/generator-updates/shared/updateGeneratorInternal.ts b/servers/fern-bot/src/functions/generator-updates/shared/updateGeneratorInternal.ts index 841caa52c3..10b66f47af 100644 --- a/servers/fern-bot/src/functions/generator-updates/shared/updateGeneratorInternal.ts +++ b/servers/fern-bot/src/functions/generator-updates/shared/updateGeneratorInternal.ts @@ -62,8 +62,10 @@ async function getCliChangelog(fdrUrl: string, from: string, to: string): Promis function formatChangelogEntry(changelog: ChangelogResponse): string { let entry = ""; - entry += `\n**\`${changelog.version}\`**\n`; - entry += changelog.changelogEntry.map((cle) => `- \`${cle.type}:\` ${cle.summary}`).join("\n"); + entry += `\n${changelog.version}\n`; + entry += changelog.changelogEntry + .map((cle) => `
  • \n\n${cle.type}: ${cle.summary}\n
  • `) + .join("\n\n"); entry += "\n"; return entry; @@ -85,7 +87,7 @@ function formatChangelogResponses(changelogs: ChangelogResponse[]): string { } // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - const prBodyTitle = `## [${changelogs[0]!.version} - ${changelogs[changelogs.length - 1]!.version}] - Changelog\n\n`; + const prBodyTitle = `## [${changelogs[0]!.version} - ${changelogs[changelogs.length - 1]!.version}] - Changelog\n\n
    \n
    \n\n
    \n
    "; } // This type is meant to mirror the data model for the `generator list` command