make sure values not provided by users resolve to undefined #144
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
addresses at least part of #142 #140 and #139
to summarize, after much trial and error I discovered an interesting quirk with the actions runtime env. all inputs (
with
values) are exposed to actions as env variables of the formINPUT_${inputname.toUpperCase()}
even when users don't provide them which is not what you might expect fromprocess.env
the actions runtime provides these instead as present with empty strings. since we use this as rest api inputs and value with an empty string != the absence of a value and hence things did not go as expected
I realized this when running experiments in a test repo using debug branch of this action and printed the param structs before requesting info from the api.
this theory also lines up with #139 (comment)
I was able to validate this pulls change on that branch with this test
https://github.com/softprops/action-gh-releases-test/actions/runs/1115229438
note: there are still a few quirks left over from recent changes like duplicate content of release bodies (see #140 (comment)) but I'd like to get this, the most significant change in first