Feat: View + Manage Pipeline (#53)

This MR adds the `.pipeline()` command which opens up the pipeline popup. This popup shows information about the current pipeline and it's jobs, and gives users the ability to re-trigger failed jobs.
This commit is contained in:
Harrison (Harry) Cramer
2023-09-03 18:01:54 -04:00
committed by GitHub
parent 4c6dcacfcd
commit e6e0bf4093
15 changed files with 267 additions and 8 deletions

View File

@@ -119,6 +119,17 @@ require("gitlab").setup({
close = { "<Esc>", "<C-c>" },
submit = { "<CR>", "<Space>" },
},
pipeline = {
created = "",
pending = "",
preparing = "",
scheduled = "",
running = "",
canceled = "",
skipped = "",
success = "",
failed = "",
},
})
```
@@ -174,6 +185,12 @@ require("gitlab").approve()
require("gitlab").revoke()
```
You can view the status of the pipeline for the current MR. To re-trigger failed jobs in the pipeline manually, use your `settings.popup.perform_action` keybinding:
```lua
require("gitlab").pipeline()
```
The `add_reviewer` and `delete_reviewer` commands, as well as the `add_assignee` and `delete_assignee` functions, will let you choose from a list of users who are availble in the current project:
```lua
@@ -209,6 +226,7 @@ vim.keymap.set("n", "<leader>glaa", gitlab.add_assignee)
vim.keymap.set("n", "<leader>glad", gitlab.delete_assignee)
vim.keymap.set("n", "<leader>glra", gitlab.add_reviewer)
vim.keymap.set("n", "<leader>glrd", gitlab.delete_reviewer)
vim.keymap.set("n", "<leader>glp", gitlab.pipeline)
```
## Troubleshooting