• removes the <esc> keybinding for popups which was causing folks to lose their changes
• deprecates the backup register.
• updates go-gitlab to latest in order to get "drafts" functionality
• fixes issues with labels not deleting correctly
• creates a new data() function to get data from the plugin directly, see :h gitlab.nvim.data
• fixes issues with line values not being computed directly, blocking jumps to/from discussion tree

This is a #MINOR release.
This commit is contained in:
Harrison (Harry) Cramer
2024-04-07 21:45:19 -04:00
committed by GitHub
parent 12c4acb297
commit 36f512cd6d
19 changed files with 299 additions and 177 deletions

View File

@@ -15,18 +15,11 @@ M.delete_label = function()
end
local refresh_label_state = function(labels)
state.INFO.labels = List.new(labels):reduce(function(agg, label)
return agg .. "," .. label
end, "")
state.INFO.labels = labels
end
local get_current_labels = function()
local label_string = state.INFO.labels
local current_labels = {}
for value in label_string:gmatch("[^,]+") do
table.insert(current_labels, value)
end
return current_labels
return state.INFO.labels
end
local get_all_labels = function()
@@ -45,16 +38,11 @@ M.add_popup = function(type)
if not choice then
return
end
local label_string = state.INFO.labels
local new_labels = {}
for value in label_string:gmatch("[^,]+") do
table.insert(new_labels, value)
end
table.insert(new_labels, choice)
local body = { labels = new_labels }
table.insert(current_labels, choice)
local body = { labels = current_labels }
job.run_job("/mr/" .. type, "PUT", body, function(data)
u.notify(data.message, vim.log.levels.INFO)
refresh_label_state(data.labels)
end)
end)