BREAKING CHANGE: Setup refactor and code cleanup
This MR makes several major tweaks to the codebase. Primarily it adjusts the setup steps for the application so that rather than providing just the project ID in the `.gitlab.nvim` file, users can also provide a vareity of other settings, such as auth_token, base_branch, and so forth. This is to make the project more extensible in the future. This MR also fixes a variety of issues with error handling in the code, primarily in the request/response model between the Lua jobs and the Golang server. BREAKING CHANGE: Modifies `.gitlab.nvim` and setup steps
This commit is contained in:
committed by
Harrison Cramer
parent
ade9f81426
commit
4f0d4b49ef
@@ -18,7 +18,10 @@ end
|
||||
|
||||
M.send_reply = function(text)
|
||||
local escapedText = string.gsub(text, "\n", "\\n")
|
||||
local json = string.format('{"discussion_id": "%s", "reply": "%s"}', state.ACTIVE_DISCUSSION, escapedText)
|
||||
|
||||
local jsonTable = { discussion_id = state.ACTIVE_DISCUSSION, reply = escapedText }
|
||||
local json = vim.json.encode(jsonTable)
|
||||
|
||||
job.run_job("reply", "POST", json, function(data)
|
||||
local note_node = M.build_note(data.note)
|
||||
note_node:expand()
|
||||
|
||||
Reference in New Issue
Block a user