-
-
Notifications
You must be signed in to change notification settings - Fork 469
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
fix: updating release draft status from true to false #316
base: master
Are you sure you want to change the base?
Conversation
@galargh can you fix the merge conflicts? Thanks! |
Of course! Done :) The diff is much cleaner now. One possible optimisation for some use cases could be to:
Let me know if you want me to add that. |
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.
looks good, can you add some tests as well?
also can you post some examples of how this PR (by pointing to the latest commit of this PR) being used. |
…` -> `false` transition (#444) This works around `softprops/action-gh-release` not being able to properly "publish" a release by changing `draft: true` to `draft: false`. The intention is that the step with `draft: false` would find the existing draft release and update it (publishing it). This is what correctly happened for a testing `v0.12.3-beta.3` release from this branch: https://github.com/pantsbuild/scie-pants/releases/tag/v0.12.3-beta.3 (I also did attempted a `v0.12.3-beta.2` from this branch, but that used a newer version of the action code and failed completely, see below.) Previously, the action would fail to find the existing draft release and instead create a duplicate one. The old behaviour is visible (to people who can see draft releases) with `v0.12.3-beta.0` and `-beta.1`. The particular new version of the action is: - changes: softprops/action-gh-release@master...huonw:action-gh-release:huonw/pantsbuild-fix-see-scie-pants-439 (specifically commit huonw/action-gh-release@998f80d from branch https://github.com/huonw/action-gh-release/commits/huonw/pantsbuild-fix-see-scie-pants-439 ) - this is v2.0.9 (the current `v2` tag) with softprops/action-gh-release#316 merged in - using v2.2.0 (the latest version of the action) fails while uploading artifacts with errors like `Request body length does not match content-length header`, so this sticks with the older version.
Hey there, thank you all for both maintaining and contributing to this action, we use it and it is helpful! Here's an example of using this PR in practice: pantsbuild/scie-pants#444 (note that we're using a custom fork but it's literally just v2.0.9 + this PR's code merged in) The resulting workflow is: https://github.com/pantsbuild/scie-pants/blob/9d73b15a0f602de1359c842a7b153b1dda53c7e9/.github/workflows/release.yml
I hope that provides some reassurance that this code seems to be functioning correctly in practice. (As I said above, thanks for maintaining and contributing.) |
Hi! Thanks for creating this action 😊
One issue I've encountered is that it's currently impossible to use the action to publish a draft issue.
In this PR, I'm trying to address this issue by changing how
existingRelease
is being looked for from agetReleaseByTag
call to iterating throughallReleases
. Previously, we were only iterating throughallReleases
if the desired state of the release wasdraft
.I'd suggest reviewing with whitespace changes hidden: https://github.com/softprops/action-gh-release/pull/316/files?diff=split&w=1
Testing