Skip to content

Commit 61c2b1a

Browse files
author
Alberto Iannaccone
authored
Install oktokit in changelog workflow (#901)
* install oktokit in changelog workflow * fix how the old changelog is cut off
1 parent 8cac087 commit 61c2b1a

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

.github/workflows/compose-full-changelog.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
- name: Create full changelog
3333
id: full-changelog
3434
run: |
35+
yarn add @octokit/rest
3536
mkdir "${{ github.workspace }}/${{ env.CHANGELOG_ARTIFACTS }}"
3637
3738
# Get the changelog file name to build

arduino-ide-extension/src/electron-main/ide-updater/ide-updater-impl.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,9 @@ export class IDEUpdaterImpl implements IDEUpdater {
8181
? await fetch(`${CHANGELOG_BASE_URL}/${latestChangelogFileName}`)
8282
: null;
8383
const changelog = response?.ok ? await response?.text() : null;
84-
84+
const currentVersionHeader = `\n\n---\n\n## ${this.updater.currentVersion}\n\n`;
8585
// We only want to see the release notes of newer versions
86-
const currentVersionIndex = changelog?.indexOf(
87-
`\r\n\r\n---\r\n\r\n## ${this.updater.currentVersion}\r\n\r\n`
88-
);
86+
const currentVersionIndex = changelog?.indexOf(currentVersionHeader);
8987
const newChangelog =
9088
currentVersionIndex && currentVersionIndex > 0
9189
? changelog?.slice(0, currentVersionIndex)

0 commit comments

Comments
 (0)