Skip to content

Commit

Permalink
chore(fern-bot): update formatting to appropriately render bullet con…
Browse files Browse the repository at this point in the history
…tents (#1412)
  • Loading branch information
armandobelardo authored Sep 8, 2024
1 parent e5e9d69 commit 1986fca
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/invoke-fern-bot-update-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,21 @@ 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 }}
REPO_TO_RUN_ON: ${{ github.event.inputs.repo }}
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
Expand All @@ -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
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/invoke-fern-bot-upgrade-generators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,21 @@ 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 }}
REPO_TO_RUN_ON: ${{ github.event.inputs.repo }}
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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<strong><code>${changelog.version}</code></strong>\n`;
entry += changelog.changelogEntry
.map((cle) => `<li>\n\n<code>${cle.type}:</code> ${cle.summary}\n</li>`)
.join("\n\n");
entry += "\n";

return entry;
Expand All @@ -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<dl>\n<dd>\n<ul>`;
let prBody = "";

// Get the first 5 changelogs
Expand All @@ -103,7 +105,7 @@ function formatChangelogResponses(changelogs: ChangelogResponse[]): string {
}
prBody += "</details>";
}
return prBodyTitle + prBody;
return prBodyTitle + prBody + "</ul>\n</dd>\n</dl>";
}

// This type is meant to mirror the data model for the `generator list` command
Expand Down

0 comments on commit 1986fca

Please sign in to comment.