Skip to content
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

Add support to ignore pre-releases #1039

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chrgernoe
Copy link

Fixes #579.

I need this feature for another project and therefore implemented the solution as proposed in the issue. Because this is my first time I contribute to the project and I'm new to JavaScript, I need a bit guidance. I also would like to implement a test but I'm a bit lost what the best strategy is and how this framework works.

@jetersen
Copy link
Member

@chrgernoe could you try and use yarn install to install node_modules and yarn prettier && yarn lint --fix && yarn build to build the dist/index.js ?

@jetersen
Copy link
Member

I think you would need to add an test inside index.test.js where payload fixture only has prereleases and one with a mix of prerelease and releases. Than test the combination of use-latest-public

lib/releases.js Outdated
Comment on lines 51 to 72
if (preRelease) {
log({ context, message: `Pre-release: ${preRelease.tag_name}` })
} else {
log({ context, message: `No pre-release found` })
}
Copy link
Member

Choose a reason for hiding this comment

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

This should not log if use-latest-public is true?

@chrgernoe
Copy link
Author

@chrgernoe could you try and use yarn install to install node_modules and yarn prettier && yarn lint --fix && yarn build to build the dist/index.js ?

Yes, I already did this but didn't checked it in since it was just a draft. I will do this as soon the PR is ready.

@chrgernoe
Copy link
Author

I think you would need to add an test inside index.test.js where payload fixture only has prereleases and one with a mix of prerelease and releases. Than test the combination of use-latest-public

OK. Thanks for the hint. I will try to implement this and also extend the doc.

@chrgernoe chrgernoe force-pushed the feature/add-support-to-ignore-pre-release branch from d4c4791 to 90b0567 Compare March 1, 2022 23:11
@chrgernoe
Copy link
Author

chrgernoe commented Mar 15, 2022

@jetersen What is the best way to generate a new GraphQL file for the following sequence, which I need for testing the new feature?

  • Release 1
  • PR1
  • PR2
  • Pre-Release 2
  • PR3
  • PR4
  • Release 2

Currently there is only a GraphQL file for PR1 ... PR4 available.

@ssbarnea
Copy link
Contributor

I someone will have time to revive this because that is currently an annoying problem with release drafter as every time we decide to create a pre-release we endup with incomplete release notes for the follow-up release, requiring us to do a lot of copy/paste to restore the full changelog.

As stated in the title, any pre-release should not be counted when building the changelog.

@jetersen
Copy link
Member

jetersen commented Aug 27, 2022

I know @blast-hardcheese and I had a discussion for rendering everything for a prerelease since the last actual release.

Right now my priority is to finish v6 and than I can more easily take on new features and PRs.

Copy link
Contributor

@blast-hardcheese blast-hardcheese left a comment

Choose a reason for hiding this comment

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

This looks like it would work, the logic looks correct and what I would have expected in an implementation. Thanks for fixing this!

@chrgernoe
Copy link
Author

@jetersen: The test is still open because of the question I asked above but unfortunately received no answer.

@jetersen
Copy link
Member

jetersen commented Aug 27, 2022

Should be able to look at existing tests and copy one of the fixtures and add a prerelease.
Another option is to prepare one of the test repos with a case and add it to the fixture generator.

One of the reasons to no answer is driving pull request over the finish line requires a village 😅
Sometimes my focus is elsewhere. Right now it is on V6 of release drafter.
Maybe it is easier to include this in v6 once we get closer to merging v6 into main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

What's changed since latest **public**
4 participants