-
Notifications
You must be signed in to change notification settings - Fork 396
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
Using draft: true
causes release-pr
to fail to find the previous release.
#1650
Comments
Sorry, I don't have a good idea on a fix for this right now. This draft feature was community contributed and this needs a design for how to handle it. |
😩 ran into this one while working on a fix for #1896 . This used to work in our flow; a draft release would be created and somehow detected by |
@plaflamme I think you're right; the tag should be created even if the release is marked as a draft. |
@cdata yes, I believe that would be the best way forward and likely the simplest. I believe it would not affect the non-draft flow as well, but that's a little difficult to know for sure without testing. @chingor13 do you think it would be acceptable for the tag to be created by |
I know this issue is a bit older, but is there any update on this? I'm kinda new to release-please and implemented it into an existing project with draft: true. I had a huge release (breaking changes) from v1.x to v2.0.0 and I'm adding the artifact after bumping and changelog generation (I've to build it manually and that's why I use draft: true) After the release PR was merged, the action (I'm using the action) started again, triggered release-please and created another release PR with v3.0.0 The most important things in the logs are:
and the changelog for v3.0.0 was EVERYTHING ever committed (instead of skipping it completely). Or is there at least a workaround (which still involves draft: true)? (And still thanks for this awesome tool! This makes everything so much easier!) |
Release please does not pick up the latest release if releases includes draft releases. googleapis/release-please#1650
Release please does not pick up the latest release if releases includes draft releases. googleapis/release-please#1650
When a release is a draft release-please can't find it, see googleapis/release-please#1650 for more info.
When a release is a draft release-please can't find it, see googleapis/release-please#1650 for more info.
When a release is a draft release-please can't find it, see googleapis/release-please#1650 for more info.
Product issue
Not that I'm aware.
No
Environment details
release-please
version:Steps to reproduce
draft
GH releasegithub-release
commandrelease-pr
commandThe
release-pr
will fail to find the drafted release and will immediately create a new "release PR".From my investigation, this is due to the fact that "draft" GH releases are able to lazily create tags.
Which is to say that when you create a draft GH release, you can specify the tag name and
ref
, but those are not yet materialized ingit
; instead, they are only created when the release is published.That said, "draft" GH releases can also point at existing tags and will "look" like any other GH release except with
isDraft
set totrue
.For example, in my fork for this repo, I created 2 releases. One pointing at an existing tag (
v14.6.0-exists
) and another that will lazily create the tag (v14.6.1-lazy
).Now, if we issue the following GraphQL query (which is used by
release-please
here, except for the additionaltagName
field):We obtain this:
As you can see the
tag
andtagCommit
values are missing for the "lazy" draft release. NOTE: you will not be able to reproduce this on my fork since "draft" releases are private.This causes the iterator defined here to skip this release and makes
release-pr
fail to find the "previous" release.Now the question is what should be the fix? Initially, I thought about removing the filter and properly handle the missing
tagCommit
andtag
fields; but an alternate approach would be to make thegithub-release
command actually create thetag
ingit
and avoid these "lazy" releases altogether. This second approach seems more correct since thegithub-release
command did indeed create the release and the repository should be tagged accordingly.Any thoughts on what the fix should be here?
The text was updated successfully, but these errors were encountered: