Skip to content

Install oktokit in changelog workflow #901

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/compose-full-changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
- name: Create full changelog
id: full-changelog
run: |
yarn add @octokit/rest
mkdir "${{ github.workspace }}/${{ env.CHANGELOG_ARTIFACTS }}"

# Get the changelog file name to build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,9 @@ export class IDEUpdaterImpl implements IDEUpdater {
? await fetch(`${CHANGELOG_BASE_URL}/${latestChangelogFileName}`)
: 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
const currentVersionIndex = changelog?.indexOf(
`\r\n\r\n---\r\n\r\n## ${this.updater.currentVersion}\r\n\r\n`
);
const currentVersionIndex = changelog?.indexOf(currentVersionHeader);
const newChangelog =
currentVersionIndex && currentVersionIndex > 0
? changelog?.slice(0, currentVersionIndex)
Expand Down