PR Section Layout (pr
)
You can define how a PR section displays items in its table by setting options for the available columns. You can define a column’s width, whether it grows to fill available space, and whether the column should be visible at all.
Note that if the length of a column’s text exceeds the defined column width
, the view
truncates the column’s text to two characters shorter than the column’s width. For example, if
the width is 6
, gh-dash
displays as .
Column headings have their color defined by the theme.colors.text.primary
setting.
JSON Schema
Definition
{
"$id": "https://dlvhdr.github.io/gh-dash/configuration/layout/pr/schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"default": {
"assignees": {
"hidden": true,
"width": 20
},
"author": {
"width": 15
},
"base": {
"hidden": true,
"width": 15
},
"lines": {
"width": 16
},
"repo": {
"width": 15
},
"updatedAt": {
"width": 7
}
},
"description": "Defines the columns a PR section displays in its table.\n\nhttps://dlvhdr.github.io/gh-dash/configuration/layout/pr/",
"properties": {
"assignees": {
"default": {
"hidden": true,
"width": 20
},
"description": "Defines options for the assignees column in a PR section.\n\nhttps://dlvhdr.github.io/gh-dash/configuration/layout/pr/#assignees",
"oneOf": [
{
"$ref": "https://dlvhdr.github.io/gh-dash/configuration/layout/options/schema.json"
}
],
"title": "PR Assignees Column",
"type": "object"
},
"author": {
"default": {
"width": 15
},
"description": "Defines options for the author column in a PR section.\n\nhttps://dlvhdr.github.io/gh-dash/configuration/layout/pr/#author",
"oneOf": [
{
"$ref": "https://dlvhdr.github.io/gh-dash/configuration/layout/options/schema.json"
}
],
"title": "PR Author Column",
"type": "object"
},
"base": {
"default": {
"hidden": true,
"width": 15
},
"description": "Defines options for the base column in a PR section.\n\nhttps://dlvhdr.github.io/gh-dash/configuration/layout/pr/#base",
"oneOf": [
{
"$ref": "https://dlvhdr.github.io/gh-dash/configuration/layout/options/schema.json"
}
],
"title": "PR Base Column",
"type": "object"
},
"ci": {
"description": "Defines options for the ci column in a PR section.\n\nhttps://dlvhdr.github.io/gh-dash/configuration/layout/pr/#ci",
"oneOf": [
{
"$ref": "https://dlvhdr.github.io/gh-dash/configuration/layout/options/schema.json"
}
],
"title": "PR Continuous Integration Column",
"type": "object"
},
"lines": {
"default": {
"width": 16
},
"description": "Defines options for the lines column in a PR section.\n\nhttps://dlvhdr.github.io/gh-dash/configuration/layout/pr/#lines",
"oneOf": [
{
"$ref": "https://dlvhdr.github.io/gh-dash/configuration/layout/options/schema.json"
}
],
"title": "PR Lines Column",
"type": "object"
},
"repo": {
"default": {
"width": 15
},
"description": "Defines options for the repo column in a PR section.\n\nhttps://dlvhdr.github.io/gh-dash/configuration/layout/pr/#repo",
"oneOf": [
{
"$ref": "https://dlvhdr.github.io/gh-dash/configuration/layout/options/schema.json"
}
],
"title": "PR Repo Column",
"type": "object"
},
"reviewStatus": {
"description": "Defines options for the review status column in a PR section.\n\nhttps://dlvhdr.github.io/gh-dash/configuration/layout/pr/#reviewStatus",
"oneOf": [
{
"$ref": "https://dlvhdr.github.io/gh-dash/configuration/layout/options/schema.json"
}
],
"title": "PR Review Status Column",
"type": "object"
},
"state": {
"description": "Defines options for the state column in a PR section.\n\nhttps://dlvhdr.github.io/gh-dash/configuration/layout/pr/#state",
"oneOf": [
{
"$ref": "https://dlvhdr.github.io/gh-dash/configuration/layout/options/schema.json"
}
],
"title": "PR State Column",
"type": "object"
},
"title": {
"description": "Defines options for the title column in a PR section.\n\nhttps://dlvhdr.github.io/gh-dash/configuration/layout/pr/#title",
"oneOf": [
{
"$ref": "https://dlvhdr.github.io/gh-dash/configuration/layout/options/schema.json"
}
],
"title": "PR Title Column",
"type": "object"
},
"updatedAt": {
"default": {
"width": 7
},
"description": "Defines options for the updated at column in a PR section.\n\nhttps://dlvhdr.github.io/gh-dash/configuration/layout/pr/#updatedAt",
"oneOf": [
{
"$ref": "https://dlvhdr.github.io/gh-dash/configuration/layout/options/schema.json"
}
],
"title": "PR Updated At Column",
"type": "object"
}
},
"title": "PR Section Layout",
"type": "object"
}
<h2 id="pr.default">Default Value</h2>
assignees:
hidden: true
width: 20
author:
width: 15
base:
hidden: true
width: 15
lines:
width: 16
repo:
width: 15
updatedAt:
width: 7
By default, PR views display the following columns in the order they're listed:
updatedAt
with a width of 7 columns.state
with a width of 3 columns.repo
with a width of 15 columns.title
, set to grow to fill available space.author
with a width of 10 columns.reviewStatus
with a width of 3 columns.ci
with a width of 3 columns.lines
with a width of 16 columns.
Even though the state
, title
, comments
, and reactions
settings
aren't explicitly defined in your configuration file, they're added to
the table unless you set their hidden
option to false
.
PR Updated At Column (updatedAt
)
This column displays how recently the PR was updated. The entry shows the time elapsed since the last update, like
or .The heading for this column is
.<h3 id="updatedat.default">Default Value</h3>
width: 7
PR State Column (state
)
This column displays the PR’s state as one of the following icons:
- When a PR is open and ready for review, the icon is
#42a0fa
. and
the color is - When a PR is in draft mode, the icon is
theme.colors.text.faint
. and the color is
set to the value of - When a PR is merged, the icon is
#a371f7
. and the color is - When a PR is closed without merging, the icon is
#c38080
. and the
color is
This heading for this column is
.PR Repo Column (repo
)
This column displays the name of the repository the PR is filed in. The entry shows the
name of the repository without the owner, like https://github.com/dlvhdr/gh-dash
repository.
The heading for this column is
.<h3 id="repo.default">Default Value</h3>
width: 15
PR Title Column (title
)
This column displays the PR’s number followed by its title. This column is always displayed
unless you set hidden
to false
. By default, it grows to fill the available space
in the terminal after accounting for other column widths.
The heading for this column is
.The theme.colors.text.primary
setting defines the issue number’s color.
PR Assignees Column (assignees
)
This column displays the usernames for the people assigned to the PR.
The heading for this column is
.<h3 id="assignees.default">Default Value</h3>
hidden: true
width: 20
PR Base Column (base
)
This column displays the base branch the PR is targeting, like
.The heading for this column is
.<h3 id="base.default">Default Value</h3>
hidden: true
width: 15
PR Review Status Column (reviewStatus
)
This column displays the review status of a PR as an icon:
- When the PR hasn’t been reviewed, the icon is
theme.colors.text.faint
. and the
color is the value of - When the PR is approved, the icon is
theme.colors.text.primary
. and the color is
the value of - When the PR has requested changes, the icon is
theme.colors.text.warning
. and the
color is the value of
The heading for this column is
.PR Continuous Integration Column (ci
)
This column displays the CI status of a PR as an icon:
- When the checks haven’t finished running, the icon is
theme.colors.text.faint
. and
the color is the value of - When the checks have all passed, the icon is
theme.colors.text.success
. and the
color is the value of - When at least one check failed, the icon is
theme.colors.text.warning
. and the
color is the value of
The heading for this column is
.PR Lines Column (lines
)
This column displays the line changes for a PR. The column represents the changes as
<added> / -<removed>
. For example, indicates 66 lines added and 46
lines removed.
The heading for this column is
.<h3 id="lines.default">Default Value</h3>
width: 16