Feat: Add target branch to details panel (#160)

This is a PATCH release, it adds the target branch to the details panel in the summary view.
This commit is contained in:
Harrison (Harry) Cramer
2024-01-13 10:45:17 -05:00
committed by GitHub
parent 50e06ceff6
commit ed3a90cf00
3 changed files with 15 additions and 12 deletions

View File

@@ -177,17 +177,18 @@ you call this function with no values the defaults will be used:
info = { -- Show additional fields in the summary view info = { -- Show additional fields in the summary view
enabled = true, enabled = true,
horizontal = false, -- Display metadata to the left of the summary rather than underneath horizontal = false, -- Display metadata to the left of the summary rather than underneath
fields = { -- The fields listed here will be displayed, in whatever order you choose fields = { -- The fields listed here will be displayed, in whatever order you choose
"author", "author",
"created_at", "created_at",
"updated_at", "updated_at",
"merge_status", "merge_status",
"draft", "draft",
"conflicts", "conflicts",
"assignees", "assignees",
"reviewers", "reviewers",
"branch", "branch",
"pipeline", "target_branch",
"pipeline",
"labels", "labels",
}, },
}, },

View File

@@ -131,6 +131,7 @@ M.build_info_lines = function()
reviewers = { title = "Reviewers", content = u.make_readable_list(info.reviewers, "name") }, reviewers = { title = "Reviewers", content = u.make_readable_list(info.reviewers, "name") },
branch = { title = "Branch", content = info.source_branch }, branch = { title = "Branch", content = info.source_branch },
labels = { title = "Labels", content = u.make_comma_separated_readable(info.labels) }, labels = { title = "Labels", content = u.make_comma_separated_readable(info.labels) },
target_branch = { title = "Target Branch", content = state.INFO.target_branch },
pipeline = { pipeline = {
title = "Pipeline Status", title = "Pipeline Status",
content = function() content = function()

View File

@@ -88,8 +88,9 @@ M.settings = {
"conflicts", "conflicts",
"assignees", "assignees",
"reviewers", "reviewers",
"branch",
"pipeline", "pipeline",
"branch",
"target_branch",
"labels", "labels",
}, },
}, },