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
Only use last full release when drafting #1240
Only use last full release when drafting #1240
Conversation
58641ed
to
1e63312
Compare
On the other hand, I think I got something wrong because I switched to use release-drafter from the for and the changelog was still based on the last pre-release instead of taking only releases under consideration: https://github.com/ansible/ansible-lint/releases My change was based on 9c77184 |
This should be If you want both draft and prerelease filtered it should be |
1e63312
to
2068ea3
Compare
@ssbarnea does that solve your problem, with my suggested change? |
@jetersen Testing it right now... I will reply with result. |
@jetersen Sadly something does not work even with this new setting. I would have expected to add the new merged change on top of the already existing ones, not to start from zero. |
lib/releases.js
Outdated
@@ -57,7 +57,7 @@ const findReleases = async ({ | |||
? commitishFilteredReleases.filter((r) => r.tag_name.startsWith(tagPrefix)) | |||
: commitishFilteredReleases | |||
const sortedPublishedReleases = sortReleases( | |||
filteredReleases.filter((r) => !r.draft) | |||
filteredReleases.filter((r) => !r.draft || !r.prerelease) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't see how this could be anything but &&
, unless it was filterNot
draft | prerelease | candidate |
---|---|---|
false | false | true |
true | false | true |
false | true | true |
true | true | false |
Only in the case that what's being evaluated is a draft for a prerelease does it not factor in. Presumably we want to only consider that which are not draft AND not prerelease.
I am on mobile though, so perhaps missing context, but &&
seems like it would work, you're saying it didn't?
Also disregards pre-releases in addition to drafts when drafting. Fixes: release-drafter#1135
2068ea3
to
b3e6b69
Compare
@jetersen I can confirm that with the new changes it works exactly as expected. Maybe we can get it in now? |
Wondering, how can we use the previous behavior to this change? Is configurable? |
AFAIK, Is not configurable and I personally do not think it should. A full release is always relative to previous full release. You cannot ask users of reeased version to read prerelease notes. |
Well, I think it depends on the platform, in our case we use release drafter for generating new iOS releases. The thing is we create a prerelease and we upload it to Apple Store. While we're waiting to the Apple reviewers verdict, we still want to keep developing + when you set the release up as prerelease, the tag is already generated. So the next tag is release-drafter computing is the same because now it can't detect prereleases. (At least is the behaviour that I'm seeing now.) |
This has broken our release flow as well.. I think we do need to make this configurable. |
I've created a pull request #1302 where you can config this behaviour. The default functionality will be the same as introduced by this PR. |
Also disregards pre-releases in addition to drafts when drafting.
Fixes: #1135