Feat: Notes (Non-Linked Comments) (#52)
Adds support for notes. These are comments that are not linked to specific lines of code in the MR.
This commit is contained in:
committed by
GitHub
parent
d92cf39dd7
commit
152c55fd57
@@ -34,8 +34,8 @@ M.add_popup = function(type)
|
||||
if not choice then return end
|
||||
local current_ids = u.extract(current, 'id')
|
||||
table.insert(current_ids, choice.id)
|
||||
local json = vim.json.encode({ ids = current_ids })
|
||||
job.run_job("/mr/" .. type, "PUT", json, function(data)
|
||||
local body = { ids = current_ids }
|
||||
job.run_job("/mr/" .. type, "PUT", body, function(data)
|
||||
vim.notify(data.message, vim.log.levels.INFO)
|
||||
state.INFO[plural] = data[plural]
|
||||
end)
|
||||
@@ -53,8 +53,8 @@ M.delete_popup = function(type)
|
||||
}, function(choice)
|
||||
if not choice then return end
|
||||
local ids = u.extract(M.filter_eligible(current, { choice }), 'id')
|
||||
local json = vim.json.encode({ ids = ids })
|
||||
job.run_job("/mr/" .. type, "PUT", json, function(data)
|
||||
local body = { ids = ids }
|
||||
job.run_job("/mr/" .. type, "PUT", body, function(data)
|
||||
vim.notify(data.message, vim.log.levels.INFO)
|
||||
state.INFO[plural] = data[plural]
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user