Add Filtering, HealthCheck, Better Tests (#350)

feat: add filtering when choosing merge requests (#346)
feat: Add healthcheck (#345)
refactor: Move to gomock (#349)
feat: Makes the remote of the plugin configurable (#348)

This is a #MINOR release.
This commit is contained in:
Harrison (Harry) Cramer
2024-08-23 14:01:59 -04:00
committed by GitHub
parent aa5d3c1f52
commit 4ae623cd65
61 changed files with 2174 additions and 1082 deletions

View File

@@ -17,6 +17,7 @@ local create_mr = require("gitlab.actions.create_mr")
local approvals = require("gitlab.actions.approvals")
local draft_notes = require("gitlab.actions.draft_notes")
local labels = require("gitlab.actions.labels")
local health = require("gitlab.health")
local user = state.dependencies.user
local info = state.dependencies.info
@@ -28,20 +29,28 @@ local merge_requests_dep = state.dependencies.merge_requests
local draft_notes_dep = state.dependencies.draft_notes
local discussion_data = state.dependencies.discussion_data
---@param args Settings | {} | nil
---@return nil
local function setup(args)
if args == nil then
args = {}
end
server.build() -- Builds the Go binary if it doesn't exist
state.merge_settings(args) -- Merges user settings with default settings
state.set_global_keymaps() -- Sets keymaps that are not bound to a specific buffer
require("gitlab.colors") -- Sets colors
reviewer.init()
discussions.initialize_discussions() -- place signs / diagnostics for discussions in reviewer
emoji.init() -- Read in emojis for lookup purposes
local is_healthy = health.check(true)
if not is_healthy then
u.notify("Plugin unhealthy, please run ':checkhealth gitlab' for details", vim.log.levels.WARN)
end
end
return {
setup = function(args)
if args == nil then
args = {}
end
server.build() -- Builds the Go binary if it doesn't exist
state.merge_settings(args) -- Merges user settings with default settings
state.set_global_keymaps() -- Sets keymaps that are not bound to a specific buffer
require("gitlab.colors") -- Sets colors
reviewer.init()
discussions.initialize_discussions() -- place signs / diagnostics for discussions in reviewer
emoji.init() -- Read in emojis for lookup purposes
end,
-- Global Actions 🌎
setup = setup,
summary = async.sequence({
u.merge(info, { refresh = true }),
labels_dep,