Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docs: choose_merge_request's open_reviewer default value is true #316

Conversation

eclbg
Copy link

@eclbg eclbg commented Jun 19, 2024

Hi Harry,
Thanks so much for writing this plugin. I've recently started a job at a company that uses Gitlab so I'm giving it a go. I noticed that the default value of open_reviewer when calling choose_merge_request was wrong in the docs, so here's a tiny PR to fix it.
Cheers!

@harrisoncramer harrisoncramer changed the base branch from main to develop June 19, 2024 22:16
@harrisoncramer
Copy link
Owner

Thanks!

@harrisoncramer harrisoncramer merged commit 5d17493 into harrisoncramer:develop Jun 19, 2024
6 checks passed
@jakubbortlik
Copy link
Collaborator

Hi @harrisoncramer, I don't think the require("gitlab").choose_merge_request({ open_reviewer = false }) was a mistake -- it was supposed to demonstrate how to override the default behaviour. @eclbg probably understood "This is the default behaviour" as saying: "the following code shows you the default behaviour". I think the following would be a more appropriate change:

diff --git a/doc/gitlab.nvim.txt b/doc/gitlab.nvim.txt
index c7af27f..426a866 100644
--- a/doc/gitlab.nvim.txt
+++ b/doc/gitlab.nvim.txt
@@ -631,11 +631,12 @@ 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 that branch locally, and optionally
-open the reviewer pane. This is the default behavior.
+This command will automatically check out that branch locally, and by default
+also open the reviewer pane (this can be overridden with the `open_reviewer`
+parameter).
 >lua
   require("gitlab").choose_merge_request()
-  require("gitlab").choose_merge_request({ open_reviewer = true })
+  require("gitlab").choose_merge_request({ open_reviewer = false })
 <
     Parameters: ~
         • {opts}: (table|nil) Keyword arguments to configure the checkout.

@eclbg
Copy link
Author

eclbg commented Jun 20, 2024

Thanks for merging it!
@jakubbortlik I see your point, and agree that it would be a valid solution too. I have no attachment to my proposal so feel free to go with whatever you prefer @harrisoncramer.
Thanks again

@harrisoncramer
Copy link
Owner

Sounds good, thanks for catching that. Feel free to merge in and change it @jakubbortlik

harrisoncramer added a commit that referenced this pull request Jun 26, 2024
* 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants