Feat: Upload Files (#59)
This MR adds the ability to add files to comments, notes, replys, and MR descriptions via a picker. The file will get uploaded to Gitlab and the filepath will be automatically added into the current popup buffer at the current line. You can then save the changes with the normal save functionality.
This commit is contained in:
committed by
GitHub
parent
45329f4d69
commit
4e473dab7e
@@ -10,6 +10,7 @@ local job = require("gitlab.job")
|
||||
local u = require("gitlab.utils")
|
||||
local state = require("gitlab.state")
|
||||
local reviewer = require("gitlab.reviewer")
|
||||
local miscellaneous = require("gitlab.actions.miscellaneous")
|
||||
|
||||
local edit_popup = Popup(u.create_popup_state("Edit Comment", "80%", "80%"))
|
||||
local reply_popup = Popup(u.create_popup_state("Reply", "80%", "80%"))
|
||||
@@ -72,7 +73,7 @@ M.reply = function(tree)
|
||||
local discussion_node = M.get_root_node(tree, node)
|
||||
local id = tostring(discussion_node.id)
|
||||
reply_popup:mount()
|
||||
state.set_popup_keymaps(reply_popup, M.send_reply(tree, id))
|
||||
state.set_popup_keymaps(reply_popup, M.send_reply(tree, id), miscellaneous.attach_file)
|
||||
end
|
||||
|
||||
-- This function will send the reply to the Go API
|
||||
|
||||
Reference in New Issue
Block a user