Fixes: Resolve entire discussion thread (#95)
This MR adjusts the comment/discussion resolution action to resolve the entire discussion thread, rather than an individual comment, which is the expected behavior during an MR review.
This commit is contained in:
@@ -214,15 +214,8 @@ func EditComment(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
options := gitlab.UpdateMergeRequestDiscussionNoteOptions{}
|
||||
|
||||
/* The PATCH can either be to the resolved status of
|
||||
the discussion or or the text of the comment */
|
||||
msg := "edit comment"
|
||||
if editCommentRequest.Comment == "" {
|
||||
options.Resolved = &editCommentRequest.Resolved
|
||||
msg = "update discussion status"
|
||||
} else {
|
||||
options.Body = gitlab.String(editCommentRequest.Comment)
|
||||
}
|
||||
options.Body = gitlab.String(editCommentRequest.Comment)
|
||||
|
||||
note, res, err := c.git.Discussions.UpdateMergeRequestDiscussionNote(c.projectId, c.mergeId, editCommentRequest.DiscussionId, editCommentRequest.NoteId, &options)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user