* Feat: Enable sorting discussions by original comment (#422) * Feat: Improve popup UX (#426) * Feat: Automatically update MR summary details (#427) * Feat: Show update progress in winbar (#432) * Feat: Abbreviate winbar (#439) * Fix: Note Creation Bug (#441) * Fix: Checking whether comment can be created (#434) * Fix: Syntax in discussion tree (#433) * fix: improve indication of resolved threads and drafts (#442) * Docs: Various minor improvements (#445) --------- Co-authored-by: Jakub F. Bortlík <jakub.bortlik@proton.me>
27 lines
581 B
Lua
27 lines
581 B
Lua
local job = require("gitlab.job")
|
|
local state = require("gitlab.state")
|
|
local u = require("gitlab.utils")
|
|
|
|
local M = {}
|
|
|
|
local refresh_status_state = function(data)
|
|
u.notify(data.message, vim.log.levels.INFO)
|
|
state.load_new_state("info", function()
|
|
require("gitlab.actions.summary").update_summary_details()
|
|
end)
|
|
end
|
|
|
|
M.approve = function()
|
|
job.run_job("/mr/approve", "POST", nil, function(data)
|
|
refresh_status_state(data)
|
|
end)
|
|
end
|
|
|
|
M.revoke = function()
|
|
job.run_job("/mr/revoke", "POST", nil, function(data)
|
|
refresh_status_state(data)
|
|
end)
|
|
end
|
|
|
|
return M
|