Explicitly replace empty body with default template#497
Conversation
There was a problem hiding this comment.
Thank you! The fix looks good. I wish I could advise you to add an automated test for this, but alas we don't yet have tests for the interactive portions of issue/pr create flows.
I'm wondering whether we should even proceed in this case? In my view as an open source maintainer, if a person hadn't edited the template at all, perhaps we shouldn't let it submit in the first place until they edit it.
On the other hand, maybe such change of functionality should be left for another PR.
mislav
left a comment
There was a problem hiding this comment.
After a short deliberation, I've decided that the fix is good for now and that we should discuss a potential change in fuctionality separately. Thank you! 🌟
|
Maybe a dumb question, but it’s not immediately apparent whether this also covers the issue create flow or just pr create. Would you mind clarifying that please, as @tierninho laid out the scenarios it doesn’t work as expected for issue creation as well. |
|
@billygriffin Certainly! This logic is shared equally between issues and prs, so any change affects both. Line 342 in 6424e8c Line 149 in 6424e8c |
|
Wonderful, thank you! |
Will look into how we can test the interactive parts and discuss the possibilities in a 1 pager (unless someone is already on it)? Or maybe will send a PR if I am feeling confident about the tests then ✨ |
This pr fixes 388.
Survey editor returns an empty string if we skip the prompt editor.go:98. In this Pr we explicitly set the body equal to template if body is empty and the template content is available.