-
Notifications
You must be signed in to change notification settings - Fork 48
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Prerequsities
- I'm on the latest version of the plugin
- I've installed the required dependencies
- I've run
:h gitlab.nvim.troubleshootingand followed the steps there
Setup Configuration and Environment
{
debug = { go_request = false, go_response = false },
popup = {
exit = "gq",
backup_register = "+", -- NOTE: Default backup to system register, may hinder performance in WSL
}
}
Bug Description
Cannot choose merge requests if there are multiple merge requests with the same source branches.
When executing :lua require('gitlab').review, gitlab.nvim will show the following error:
gitlab.nvim: Multiple MRs found: please call gitlab.choose_merge_request()
And executing :lua require('gitlab').choose_merge_request() and choose the MR, it still show the above error.
It occurs when the source branch of a merge request is deleted upon merging, and another MR is created with a newly created source branch that has the same name as the original.
I think the solution to this is to check if the merge request is merged or not and only check if the open merge requests is more than one in
gitlab.nvim/cmd/app/middleware.go
Line 123 in 38bde8a
| if len(mergeRequests) > 1 { |
Reproduction Steps
- Create a MR with branch
example. - Merge with the option "delete source branch" checked.
- Create another MR with branch
example. - Checkout
examplebranch. - Open Neovim
- Execute
:lua require('gitlab').review()or:lua require('gitlab').choose_merge_request()and selectexamplebranch.
Screenshots
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
