Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

fix: include prerelease in changelog only for prerelease #1003

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

snutij
Copy link
Contributor

@snutij snutij commented Jan 25, 2024

Motivation

Closes Shopify/ruby-lsp#1673

Prerelease are included in changelog, which render something not ordered and hard to read for user.

Implementation

Filter out prerelease.

Automated Tests

N/A

Manual Tests

Same as #810, impossible to test this flow exactly to me, but I added this step in the CI workflow, you can see the result on my fork, toggle the Cat part. No prerelease are included.

@snutij snutij requested a review from a team as a code owner January 25, 2024 14:13
@snutij snutij requested review from Morriar and st0012 January 25, 2024 14:13
@@ -34,6 +34,7 @@ jobs:
});

const changelog = releases
.filter((release) => !release.prerelease)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this, we always filter the prerelease entries. Can we do this only when we publish a stable release? That way, when we create a prerelease people can still see the entries related to it.

The information about whether the release being published is a prerelease or not should be available somewhere in the action's context.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found it in context.payload.release.prerelease let me know if it's OK like that 👍

I'll change the PR title to be more exact about the solution implemented.

Copy link
Contributor Author

@snutij snutij Jan 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, i tested here, without all the publishing steps to be sure it was ok. The cat part include well prerelease changelog for a prerelease.

@snutij snutij changed the title fix: do not include prerelease in changelog fix: include prerelease in changelog only for prerelease Jan 25, 2024
Copy link
Member

@vinistock vinistock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution!

@vinistock vinistock merged commit 3e11a5b into Shopify:main Jan 26, 2024
6 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changelog on VSCode Marketplace include pre-release versions
2 participants