Skip updating an existing issue when update_existing=false.#112
Merged
JasonEtco merged 2 commits intoJasonEtco:mainfrom Sep 28, 2021
Merged
Skip updating an existing issue when update_existing=false.#112JasonEtco merged 2 commits intoJasonEtco:mainfrom
JasonEtco merged 2 commits intoJasonEtco:mainfrom
Conversation
This was referenced Sep 21, 2021
JasonEtco
reviewed
Sep 27, 2021
Comment on lines
+12
to
+21
| let updateExisting: Boolean | null = null | ||
| if (tools.inputs.update_existing) { | ||
| if (tools.inputs.update_existing === 'true') { | ||
| updateExisting = true | ||
| } else if (tools.inputs.update_existing === 'false') { | ||
| updateExisting = false | ||
| } else { | ||
| tools.exit.failure(`Invalid value update_existing=${tools.inputs.update_existing}, must be one of true or false`) | ||
| } | ||
| } |
Owner
There was a problem hiding this comment.
This looks great, thanks for adding the validation check (and the test) 🔥 ✨
aad5a8a to
d21b730
Compare
d21b730 to
3eebcfd
Compare
Contributor
Author
|
Rebased, updated with the suggested change, and ready to merge. |
JasonEtco
approved these changes
Sep 28, 2021
Owner
JasonEtco
left a comment
There was a problem hiding this comment.
Woohoo! Thanks for doing this 🎉
Owner
|
Published in https://github.com/JasonEtco/create-an-issue/releases/tag/v2.6.0! Thanks again for the contribution 🙌 |
This was referenced Sep 28, 2021
This was referenced Oct 1, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
As far as I can see
update_existing=garbageorupdate_existing=falseworks asupdate_existing=truetoday becauseBooleandoesn't parse but casts anything to true/false. With this changeupdate_existingcan betrue,falseand undefined.true, an existing issue is updated.false, an existing issue is not updated.undefined, a new issue is always created.Closes #108.