@@ -449,20 +449,19 @@ the configuration.
449449
450450REVIEWING AN MR *gitlab.nvim.reviewing-an-mr*
451451
452- The `review` action will open a diff of the changes. You can leave comments
453- using the `create_comment` action, and add suggestions for changes with the
454- `create_comment_suggestion` command:
452+ The `review` action opens a diff of the changes (see | gitlab.nvim.review | ).
453+ Alternatively, use `choose_merge_request` for more flexibility in choosing the
454+ MR (see | gitlab.nvim.choose_merge_request | ).
455455>lua
456456 require("gitlab").review()
457- require("gitlab").create_comment()
458- require("gitlab").create_comment_suggestion()
457+ require("gitlab").choose_merge_request({ labels = {"include_mrs_with_label"} })
459458<
460- For suggesting changes you can use `create_comment_suggestion` in visual mode
461- which prefills the comment window with Gitlab’s suggest changes
462- < https://docs.gitlab.com/ee/user/project/merge_requests/reviews/suggestions.html >
463- code block with prefilled code from the visual selection. Just like the
464- summary, all the different kinds of comments are saved via the
465- `keymaps. popup .perform_action` keybinding .
459+ You can leave comments in the reviewer windows using the `keymaps.reviewer`
460+ keybindings which work in normal mode as operators and in visual mode they
461+ create comments on the selected lines. Alternatively, you can use the
462+ `create_comment` action in your custom mappings (see
463+ | gitlab.nvim.create_comment | ). See `settings.keymaps. popup ` for the
464+ keybindings available in the popup windows .
466465
467466DRAFT NOTES *gitlab.nvim.draft-comments*
468467
@@ -883,27 +882,26 @@ gitlab.create_comment() ~
883882Opens a popup to create a comment on the selected line(s) in the current
884883buffer. Must be called when focused on the reviewer pane (see the
885884| gitlab.nvim.review | command). In normal mode comments on the current line. In
886- visual mode comments on the selected lines
885+ visual mode comments on the selected lines:
887886>lua
888887 require("gitlab").create_comment()
888+ require("gitlab").create_comment({ with_suggestion = true })
889889<
890- You can use the `keymaps.popup .perform_linewise_action` keybinding (by default
891- `ZA` ) to attach a file to the comment. After the comment is typed, submit it
892- to Gitlab via the `keymaps.popup .perform_action` keybinding, by default `ZZ` .
893- Discard the comment with `keymaps.popup .discard_changes` (`ZQ` ), otherwise if
894- you close the popup with something like `<c-w> q ` , the comment contents are
895- saved to the temporary register(s) (| gitlab.nvim.temp-registers | ).
896-
897- *gitlab.nvim.create_comment_suggestion*
898- gitlab.create_comment_suggestion() ~
899-
900- Opens a popup to create a comment suggestion (aka a comment that makes a committable
901- change suggestion to the currently selected lines).
902- >lua
903- require("gitlab").create_comment_suggestion()
904- <
905- After the comment is typed, submit it to Gitlab via the
906- `keymaps.popup .perform_linewise_action` keybinding, by default `ZA` .
890+ Parameters: ~
891+ • {opts} : (table|nil) Keyword arguments that can be used to include
892+ a suggestion in the comment.
893+ • {with_suggestion} (boolean) When true, pastes into the comment
894+ buffer Gitlab’s suggestion code block prefilled with the
895+ original text from the visual selection. See
896+ https://docs.gitlab.com/ee/user/project/merge_requests/reviews/suggestions.html .
897+
898+ In the popup, you can use the `keymaps.popup .perform_linewise_action`
899+ keybinding (by default `ZA` ) to attach a file to the comment. After the
900+ comment is typed, submit it to Gitlab via the `keymaps.popup .perform_action`
901+ keybinding, by default `ZZ` . Discard the comment with
902+ `keymaps.popup .discard_changes` (`ZQ` ), otherwise if you close the popup with
903+ something like `<c-w> q ` , the comment contents are saved to the temporary
904+ register(s) (| gitlab.nvim.temp-registers | ).
907905
908906 *gitlab.nvim.create_mr*
909907gitlab.create_mr({opts}) ~
0 commit comments