Batch comments on merge requests
What this MR do
- Create a draft_notestable which is similar tonotestable
- When user hits to publish draft we transfer all draft_notesto notes table
Important things to cover
- Draft notes can be created in a diff file or not
- Draft notes should have a position that works just like it does in DiffNotes
- When draft note is on an present discussion we should consider the discussion_idwhen publishing
- When draft note is on a new discussion we should generate a new discussion ID
obs: It is not needed to group draft notes by discussion_id for now, as described on the #1984 (closed) it is only allowed to have one draft note per discussion.
Important things to test
- When draft is published check if notes are working on image diffs and text diffs.
Important implementation details
- When sending in a DraftNote as a reply to a discussion, in_reply_to_discussion_idshould be sent, notdiscussion_id
- Please send resolve_discussionaccording to this table:
| Current Discussion state | Desired Discussion state | resolve_discussionvalue | 
|---|---|---|
| unresolved | resolved | true | 
| unresolved | unresolved | false | 
| resolved | unresolved | false | 
| resolved | resolved | true | 
ToDo
- 
[Backend] Adding license check for GitLab Premium 
- 
[Backend] Adding publishing service 
- 
[Backend] Keep position + discussion id for all draft notes 
- 
[Backend] Render the DraftNote HTML via Banzai 
- 
Backports for CE 
For Frontend, please check separate MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/7376
Edge cases / Follow up?
- What happens when a draft is saved in a discussion that gets deleted?
Edited  by Coung Ngo