Release (#440)
* Feat: Enable sorting discussions by original comment (#422) * Feat: Improve popup UX (#426) * Feat: Automatically update MR summary details (#427) * Feat: Show update progress in winbar (#432) * Feat: Abbreviate winbar (#439) * Fix: Note Creation Bug (#441) * Fix: Checking whether comment can be created (#434) * Fix: Syntax in discussion tree (#433) * fix: improve indication of resolved threads and drafts (#442) * Docs: Various minor improvements (#445) --------- Co-authored-by: Jakub F. Bortlík <jakub.bortlik@proton.me>
This commit is contained in:
committed by
GitHub
parent
be027331e1
commit
495e64c8bc
@@ -12,14 +12,6 @@ local M = {}
|
||||
---Opens up a select menu that lets you choose a different merge request.
|
||||
---@param opts ChooseMergeRequestOptions|nil
|
||||
M.choose_merge_request = function(opts)
|
||||
local has_clean_tree, clean_tree_err = git.has_clean_tree()
|
||||
if clean_tree_err ~= nil then
|
||||
return
|
||||
elseif has_clean_tree ~= "" then
|
||||
u.notify("Your local branch has changes, please stash or commit and push", vim.log.levels.ERROR)
|
||||
return
|
||||
end
|
||||
|
||||
if opts == nil then
|
||||
opts = state.settings.choose_merge_request
|
||||
end
|
||||
@@ -38,6 +30,19 @@ M.choose_merge_request = function(opts)
|
||||
reviewer.close()
|
||||
end
|
||||
|
||||
if choice.source_branch ~= git.get_current_branch() then
|
||||
local has_clean_tree, clean_tree_err = git.has_clean_tree()
|
||||
if clean_tree_err ~= nil then
|
||||
return
|
||||
elseif not has_clean_tree then
|
||||
u.notify(
|
||||
"Cannot switch branch when working tree has changes, please stash or commit and push",
|
||||
vim.log.levels.ERROR
|
||||
)
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
vim.schedule(function()
|
||||
local _, branch_switch_err = git.switch_branch(choice.source_branch)
|
||||
if branch_switch_err ~= nil then
|
||||
|
||||
Reference in New Issue
Block a user