Broke require("gitlab").start_server() command into separate function

This will make debugging easier!
This commit is contained in:
Harrison Cramer
2023-08-17 17:13:35 -04:00
parent 14bb2800e5
commit 8c9d46ceb5
2 changed files with 71 additions and 59 deletions

View File

@@ -199,7 +199,14 @@ vim.keymap.set("n", "<leader>glrd", gitlab.delete_reviewer)
## Troubleshooting
This plugin uses a Golang server to reach out to Gitlab. The Golang server runs outside of Neovim, and can be interacted with directly in order to troubleshoot. The server will start up when you open Neovim with a MR branch. You can curl it directly:
This plugin uses a Golang server to reach out to Gitlab. It's possible that something is going wrong when starting that server or connecting with Gitlab. The Golang server runs outside of Neovim, and can be interacted with directly in order to troubleshoot. To start the server, check out your feature branch and run these commands:
```
:lua require("gitlab").build()
:lua require("gitlab").start_server()
```
You can directly interact with the Go server like any other process:
```
curl --header "PRIVATE-TOKEN: ${GITLAB_TOKEN}" localhost:21036/info