Feat: Adds More Information to Summary Panel (#100)

This MR adds more information into the summary view, including the MR author, created at date, merge status, draft status, conflicts, and pipeline status, among other things. This is configurable via the setup function.
This commit is contained in:
Harrison (Harry) Cramer
2023-11-20 18:56:19 -05:00
committed by GitHub
parent 88b9196a2e
commit c4a3229f16
7 changed files with 333 additions and 55 deletions

View File

@@ -20,6 +20,14 @@ local function get_pipeline()
return pipeline
end
M.get_pipeline_status = function()
local pipeline = get_pipeline()
if pipeline == nil then
return nil
end
return string.format("%s (%s)", state.settings.pipeline[pipeline.status], pipeline.status)
end
-- The function will render the Pipeline state in a popup
M.open = function()
local pipeline = get_pipeline()
@@ -44,7 +52,7 @@ M.open = function()
local lines = {}
u.switch_can_edit_buf(bufnr, true)
table.insert(lines, string.format("Status: %s (%s)", state.settings.pipeline[pipeline.status], pipeline.status))
table.insert(lines, "Status: " .. M.get_pipeline_status())
table.insert(lines, "")
table.insert(lines, string.format("Last Run: %s", u.time_since(pipeline.created_at)))
table.insert(lines, string.format("Url: %s", pipeline.web_url))