committed by
GitHub
parent
899e04082e
commit
08463c0b84
20
README.md
20
README.md
@@ -65,12 +65,32 @@ use {
|
||||
}
|
||||
```
|
||||
|
||||
## Multiple Gitlab Repositories
|
||||
|
||||
By default, the tool will look for and interact with MRs against a "main" branch. You can configure this by passing in the `base_branch` option:
|
||||
|
||||
```lua
|
||||
require('gitlab').setup({ project_id = 3, base_branch = 'master' })
|
||||
```
|
||||
|
||||
By default, the plugin will read the `project_id` provided in the setup call. However, if you add a `.gitlab.nvim` file to the root of your directory, the plugin will read that and use it as the project_id instead. The file should only contain the ID of the project:
|
||||
|
||||
```
|
||||
112415
|
||||
```
|
||||
|
||||
Which is effectively like calling the setup function like this:
|
||||
|
||||
```lua
|
||||
require('gitlab').setup({ project_id = 112415, base_branch = 'master' })
|
||||
```
|
||||
|
||||
If you are using `main` as your branch and you add a `.gitlab.nvim` configuration file, you can call an empty setup function and the plugin will work:
|
||||
|
||||
```lua
|
||||
require('gitlab').setup()
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
First, check out the branch that you want to review locally. Then open Neovim and the reviewer will be initialized. The `project_id` you specify in your configuration must match the project_id of the Gitlab project your terminal is inside of.
|
||||
|
||||
Reference in New Issue
Block a user