Release (#313)
* Fix docs: choose_merge_request's open_reviewer default value is true (#316) * Fix: Only set autocommands for select popups (#315) * Docs: Small improvements to README and docs * Feat: Add branch info to choose_merge_request menu (#318) This is a PATCH release.
This commit is contained in:
committed by
GitHub
parent
96d7e16ef7
commit
3c9d95d25b
@@ -316,8 +316,6 @@ M.create_mr = function()
|
||||
forked_project_id = forked_project_id,
|
||||
}
|
||||
|
||||
vim.print(body)
|
||||
|
||||
job.run_job("/create_mr", "POST", body, function(data)
|
||||
u.notify(data.message, vim.log.levels.INFO)
|
||||
M.reset_state()
|
||||
|
||||
@@ -25,7 +25,7 @@ M.choose_merge_request = function(opts)
|
||||
vim.ui.select(state.MERGE_REQUESTS, {
|
||||
prompt = "Choose Merge Request",
|
||||
format_item = function(mr)
|
||||
return string.format("%s (%s)", mr.title, mr.author.name)
|
||||
return string.format("%s [%s -> %s] (%s)", mr.title, mr.source_branch, mr.target_branch, mr.author.name)
|
||||
end,
|
||||
}, function(choice)
|
||||
if not choice then
|
||||
|
||||
@@ -63,10 +63,20 @@ M.summary = function()
|
||||
description_popup,
|
||||
M.edit_summary,
|
||||
miscellaneous.attach_file,
|
||||
{ cb = exit, action_before_close = true, save_to_temp_register = true }
|
||||
{ cb = exit, action_before_close = true, action_before_exit = true, save_to_temp_register = true }
|
||||
)
|
||||
state.set_popup_keymaps(
|
||||
title_popup,
|
||||
M.edit_summary,
|
||||
nil,
|
||||
{ cb = exit, action_before_close = true, action_before_exit = true }
|
||||
)
|
||||
state.set_popup_keymaps(
|
||||
info_popup,
|
||||
M.edit_summary,
|
||||
nil,
|
||||
{ cb = exit, action_before_close = true, action_before_exit = true }
|
||||
)
|
||||
state.set_popup_keymaps(title_popup, M.edit_summary, nil, { cb = exit, action_before_close = true })
|
||||
state.set_popup_keymaps(info_popup, M.edit_summary, nil, { cb = exit, action_before_close = true })
|
||||
miscellaneous.set_cycle_popups_keymaps(popups)
|
||||
|
||||
vim.api.nvim_set_current_buf(description_popup.bufnr)
|
||||
@@ -151,8 +161,6 @@ M.edit_summary = function()
|
||||
u.notify(data.message, vim.log.levels.INFO)
|
||||
state.INFO.description = data.mr.description
|
||||
state.INFO.title = data.mr.title
|
||||
M.layout:unmount()
|
||||
M.layout_visible = false
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user