Fix MR Selection, Go Code Refactor (#358)

refactor: Refactors the Go codebase into a more modular and idiomatic approach
fix: require selection of specific MR when there are multiple targets for a given source branch
feat: Allows for the passing of Gitlab's filter options when choosing an MR, improves MR selection
feat: API to choose an MR from a list based on the provided username's involvement as an assignee/reviewer/author

This is a #MINOR release
This commit is contained in:
Harrison (Harry) Cramer
2024-09-08 16:45:09 -04:00
committed by GitHub
parent 6500ef1f2c
commit ea2b2b2f5c
81 changed files with 2559 additions and 3035 deletions

View File

@@ -20,8 +20,11 @@ M.start = function(callback)
debug = state.settings.debug,
log_path = state.settings.log_path,
connection_settings = state.settings.connection_settings,
chosen_target_branch = state.chosen_target_branch,
}
state.chosen_target_branch = nil -- Do not let this interfere with subsequent reviewer.open() calls
local settings = vim.json.encode(go_server_settings)
local command = string.format("%s '%s'", state.settings.bin, settings)
@@ -117,7 +120,7 @@ M.shutdown = function(cb)
end)
end
-- Restarts the Go server and clears out all gitlab.nvim state
---Restarts the Go server and clears out all gitlab.nvim state
M.restart = function(cb)
if not state.go_server_running then
vim.notify("The gitlab.nvim server is not running", vim.log.levels.ERROR)