Draft: Add quick action to add thread when opening issuables
What does this MR do and why?
Related issues: #390661, #235345
Adds a /discussion <comment>
quick action to add comment threads when creating issues/epics/merge requests. The primary use-case for this is in templates, so threads can be automatically created without user intervention.
Why is this only available during issuable creation?
- If the issuable already exists, users can just comment/add a thread directly.
- I don't want to figure out the best way to protect against cyclical comments (
/discussion /discussion /discussion /discussion
). - I don't want to decide on the best approach for using
/discussion
in comments on existing threads.
#390661 exactly?
Why doesn't this match the designs in-
&9447 got deprioritized as a whole, so I'm not really implementing that issue directly here. But this MR won't contradict anything described in #390661 & this MR would unblock that work if it ever does get prioritized again.
- So then why am I even working on this? Sometimes brains are tricky and you just open MRs. Whoops, I guess?
- The
~"<comment>"
formatting/syntax isn't actually needed to post a single-line comment. - I didn't want to deal with expanding the command-identifying regex to allow for multiline comments.
Screenshots or screen recordings
Happy path: issues
Command search | Sample usage | Preview message | Posted issue |
---|---|---|---|
Unhappy path: comments
Empty command search | Lack of preview message | Error message on save & no comment from command-only note |
---|---|---|
How to set up and validate locally
- Go through flow to create an issue, MR, or epic in any project/group
- Include
/discussion whatever comment
in your description - Save!
- See the beauty.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.