diff --git a/cmd/comment.go b/cmd/comment.go index 8530108..5908329 100644 --- a/cmd/comment.go +++ b/cmd/comment.go @@ -111,7 +111,10 @@ func getMRVersions(projectId string, mergeId int) (e error, response *http.Respo return nil, response } -/* Creates a new merge request discussion https://docs.gitlab.com/ee/api/discussions.html#create-new-merge-request-thread */ +/* +Creates a new merge request discussion https://docs.gitlab.com/ee/api/discussions.html#create-new-merge-request-thread +The go-gitlab client was not working for this API specifically 😢 +*/ func (c *Client) CommentOnDeletion(lineNumber string, fileName string, comment string, diffVersionInfo MRVersion, i int) (*http.Response, error) { deletionDiscussionUrl := fmt.Sprintf("https://gitlab.com/api/v4/projects/%s/merge_requests/%d/discussions", c.projectId, c.mergeId) @@ -126,7 +129,6 @@ func (c *Client) CommentOnDeletion(lineNumber string, fileName string, comment s /* We need to set these properties differently depending on whether we're commenting on a deleted line, a modified line, an added line, or an unmodified line */ - _ = writer.WriteField("position[old_path]", fileName) _ = writer.WriteField("position[new_path]", fileName) if i == 0 { diff --git a/lua/gitlab/utils/init.lua b/lua/gitlab/utils/init.lua index 2da5e9a..9c1daeb 100644 --- a/lua/gitlab/utils/init.lua +++ b/lua/gitlab/utils/init.lua @@ -153,17 +153,15 @@ local function darken_metadata(bufnr, regex) end local function print_success(_, line) - print(line) - -- if line ~= nil and line ~= "" then - -- notify(line, "info") - -- end + if line ~= nil and line ~= "" then + notify(line, "info") + end end local function print_error(_, line) - print(line) - -- if line ~= nil and line ~= "" then - -- notify(line, "error") - -- end + if line ~= nil and line ~= "" then + notify(line, "error") + end end local function exit(popup)