mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-07 19:36:33 +00:00
Install oktokit in changelog workflow (#901)
* install oktokit in changelog workflow * fix how the old changelog is cut off
This commit is contained in:
parent
8cac0872a4
commit
61c2b1a007
@ -32,6 +32,7 @@ jobs:
|
|||||||
- name: Create full changelog
|
- name: Create full changelog
|
||||||
id: full-changelog
|
id: full-changelog
|
||||||
run: |
|
run: |
|
||||||
|
yarn add @octokit/rest
|
||||||
mkdir "${{ github.workspace }}/${{ env.CHANGELOG_ARTIFACTS }}"
|
mkdir "${{ github.workspace }}/${{ env.CHANGELOG_ARTIFACTS }}"
|
||||||
|
|
||||||
# Get the changelog file name to build
|
# Get the changelog file name to build
|
||||||
|
@ -81,11 +81,9 @@ export class IDEUpdaterImpl implements IDEUpdater {
|
|||||||
? await fetch(`${CHANGELOG_BASE_URL}/${latestChangelogFileName}`)
|
? await fetch(`${CHANGELOG_BASE_URL}/${latestChangelogFileName}`)
|
||||||
: null;
|
: null;
|
||||||
const changelog = response?.ok ? await response?.text() : null;
|
const changelog = response?.ok ? await response?.text() : null;
|
||||||
|
const currentVersionHeader = `\n\n---\n\n## ${this.updater.currentVersion}\n\n`;
|
||||||
// We only want to see the release notes of newer versions
|
// We only want to see the release notes of newer versions
|
||||||
const currentVersionIndex = changelog?.indexOf(
|
const currentVersionIndex = changelog?.indexOf(currentVersionHeader);
|
||||||
`\r\n\r\n---\r\n\r\n## ${this.updater.currentVersion}\r\n\r\n`
|
|
||||||
);
|
|
||||||
const newChangelog =
|
const newChangelog =
|
||||||
currentVersionIndex && currentVersionIndex > 0
|
currentVersionIndex && currentVersionIndex > 0
|
||||||
? changelog?.slice(0, currentVersionIndex)
|
? changelog?.slice(0, currentVersionIndex)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user