Add Filtering, HealthCheck, Better Tests (#350)

feat: add filtering when choosing merge requests (#346)
feat: Add healthcheck (#345)
refactor: Move to gomock (#349)
feat: Makes the remote of the plugin configurable (#348)

This is a #MINOR release.
This commit is contained in:
Harrison (Harry) Cramer
2024-08-23 14:01:59 -04:00
committed by GitHub
parent aa5d3c1f52
commit 4ae623cd65
61 changed files with 2174 additions and 1082 deletions

View File

@@ -55,10 +55,6 @@ QUICK START *gitlab.nvim.quick-start*
This will checkout the branch locally, and up the plugin's reviewer pane.
NOTE: At the moment, the plugin assumes that the remote where you want to
merge your feature branch is called "origin".
INSTALLATION *gitlab.nvim.installation*
With Lazy:
@@ -165,6 +161,7 @@ you call this function with no values the defaults will be used:
},
connection_settings = {
insecure = false, -- Like curl's --insecure option, ignore bad x509 certificates on connection
remote = "origin", -- The default remote that your MRs target
},
keymaps = {
disable_all = false, -- Disable all mappings created by the plugin
@@ -685,8 +682,11 @@ following to your config:
TROUBLESHOOTING *gitlab.nvim.troubleshooting*
To check that the current settings of the plugin are configured correctly,~
please run:~
To check the health of the plugin and related dependencies, please run:
>vim
:checkhealth gitlab
<
To print your current settings:
>lua
require("gitlab").print_settings()
<
@@ -726,17 +726,24 @@ default arguments outlined under "Configuring the Plugin".
gitlab.choose_merge_request({opts}) ~
Choose a merge request from a list of those open in your current project to
review. This command will automatically check out the feature branch locally,
and by default also open the reviewer pane (this can be overridden with the
`open_reviewer` parameter).
review. This command will automatically check out the feature branch locally
and open the reviewer pane (this can be overridden with the `open_reviewer`
parameter.
You can also filter merge requests by specifying `label` and `notlabel`
parameters.
>lua
require("gitlab").choose_merge_request()
require("gitlab").choose_merge_request({ open_reviewer = false })
require("gitlab").choose_merge_request({ label = {"include_mrs_with_label"} })
require("gitlab").choose_merge_request({ notlabel = {"exclude_mrs_with_label"} })
<
Parameters: ~
• {opts}: (table|nil) Keyword arguments to configure the checkout.
• {open_reviewer}: (boolean) Whether to open the reviewer after
switching branches. True by default.
• {label}: (table<string>) Return merge requests with *including* matching labels
• {notlabel}: (table<string>) Return merge requests *excluding*
matching label
<
*gitlab.nvim.review*
gitlab.review() ~