-
Notifications
You must be signed in to change notification settings - Fork 91
Skip updating an existing issue when update_existing=false. #112
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
Conversation
JasonEtco
left a comment
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.
This looks great @dblock, thanks so much for adding the tests and README updates. I left one minor comment about a tiny bit of code clarity, but otherwise this is good to go.
| 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`) | ||
| } | ||
| } |
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.
This looks great, thanks for adding the validation check (and the test) 🔥 ✨
aad5a8a to
d21b730
Compare
d21b730 to
3eebcfd
Compare
|
Rebased, updated with the suggested change, and ready to merge. |
JasonEtco
left a comment
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.
Woohoo! Thanks for doing this 🎉
|
Published in https://github.com/JasonEtco/create-an-issue/releases/tag/v2.6.0! Thanks again for the contribution 🙌 |
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.