-
Notifications
You must be signed in to change notification settings - Fork 182
/
pr.yaml
268 lines (242 loc) Β· 9.37 KB
/
pr.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
# yaml-language-server: $schema=https://json-schema.org/draft/2020-12/schema
$schema: https://json-schema.org/draft/2020-12/schema
$id: pr.schema.yaml
title: PR Section Layout
description: Defines the columns a PR section displays in its table.
type: object
schematize:
details: |
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 [sref:`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 ![styled:`gh-d`]().
Column headings have their color defined by the [sref:`theme.colors.text.primary`] setting.
[sref:`width`]: layout.options.width
[sref:`theme.colors.text.primary`]: theme.colors.text.primary
format: yaml
default:
details: |
By default, PR views display the following columns in the order they're listed:
1. [sref:`updatedAt`] with a width of 7 columns.
1. [sref:`state`] with a width of 3 columns.
1. [sref:`repo`] with a width of 15 columns.
1. [sref:`title`], set to grow to fill available space.
1. [sref:`author`] with a width of 10 columns.
1. [sref:`reviewStatus`] with a width of 3 columns.
1. [sref:`ci`] with a width of 3 columns.
1. [sref:`lines`] with a width of 16 columns.
```alert
---
variant: primary
---
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 [sref:`hidden`] option to `false`.
[sref:`hidden`]: layout.options.hidden
```
[sref:`updatedAt`]: layout.pr.updatedAt
[sref:`state`]: layout.pr.state
[sref:`repo`]: layout.pr.repo
[sref:`title`]: layout.pr.title
[sref:`author`]: layout.pr.author
[sref:`reviewStatus`]: layout.pr.reviewStatus
[sref:`ci`]: layout.pr.ci
[sref:`lines`]: layout.pr.lines
default:
updatedAt:
width: 7
repo:
width: 15
author:
width: 15
assignees:
width: 20
hidden: true
base:
width: 15
hidden: true
lines:
width: 16
properties:
updatedAt:
title: PR Updated At Column
description: Defines options for the updated at column in a PR section.
type: object
oneOf:
- $ref: ./options.yaml
schematize:
weight: 1
skip_schema_render: true
format: yaml
details: |
This column displays how recently the PR was updated. The entry shows the time elapsed
since the last update, like ![styled:`1h`]() or ![styled:`3d`]().
The heading for this column is ![styled:`οΊ`]().
default:
width: 7
state:
title: PR State Column
description: Defines options for the state column in a PR section.
type: object
oneOf:
- $ref: ./options.yaml
schematize:
weight: 2
skip_schema_render: true
details: |
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 ![styled:`ξ§`](. "ready-review") and
the color is `#42a0fa`.
- When a PR is in draft mode, the icon is ![styled:`ξ§`](. "faint-text") and the color is
set to the value of [sref:`theme.colors.text.faint`].
- When a PR is merged, the icon is ![styled:`ξ§`](. "merged") and the color is `#a371f7`.
- When a PR is closed without merging, the icon is ![styled:`ο`](. "closed-pr") and the
color is `#c38080`.
This heading for this column is ![styled:`ξ§`]().
[sref:`theme.colors.text.faint`]: theme.colors.text.faint
repo:
title: PR Repo Column
description: Defines options for the repo column in a PR section.
type: object
oneOf:
- $ref: ./options.yaml
schematize:
weight: 3
skip_schema_render: true
format: yaml
details: |
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 ![styled:`gh-dash`]() for the
`https://github.com/dlvhdr/gh-dash` repository.
The heading for this column is ![styled:`ο`]().
[sref:`width`]: layout.options.width
default:
width: 15
title:
title: PR Title Column
description: Defines options for the title column in a PR section.
type: object
oneOf:
- $ref: ./options.yaml
schematize:
weight: 4
skip_schema_render: true
format: yaml
details: |
This column displays the PR's number followed by its title. This column is always displayed
unless you set [sref:`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 ![styled:`Title`]().
The [sref:`theme.colors.text.primary`] setting defines the issue number's color.
[sref:`hidden`]: layout.options.hidden
[sref:`theme.colors.text.primary`]: theme.colors.text.primary
author:
title: PR Author Column
description: Defines options for the author column in a PR section.
type: object
oneOf:
- $ref: ./options.yaml
schematize:
weight: 5
skip_schema_render: true
format: yaml
details: |
This column displays the username for the person who created the PR.
The heading for this column is ![styled:`Author`]().
default:
width: 15
assignees:
title: PR Assignees Column
description: Defines options for the assignees column in a PR section.
type: object
oneOf:
- $ref: ./options.yaml
schematize:
weight: 6
skip_schema_render: true
format: yaml
details: |
This column displays the usernames for the people assigned to the PR.
The heading for this column is ![styled:`Assignees`]().
default:
width: 20
hidden: true
base:
title: PR Base Column
description: Defines options for the base column in a PR section.
type: object
oneOf:
- $ref: ./options.yaml
schematize:
weight: 7
skip_schema_render: true
format: yaml
details: |
This column displays the base branch the PR is targeting, like ![styled:`main`]().
The heading for this column is ![styled:`Base`]().
default:
width: 15
hidden: true
reviewStatus:
title: PR Review Status Column
description: Defines options for the review status column in a PR section.
type: object
oneOf:
- $ref: ./options.yaml
schematize:
weight: 8
skip_schema_render: true
format: yaml
details: |
This column displays the review status of a PR as an icon:
- When the PR hasn't been reviewed, the icon is ![styled:`ξ`](. "faint-text") and the
color is the value of [sref:`theme.colors.text.faint`].
- When the PR is approved, the icon is ![styled:`σ°¬`](. "primary-text") and the color is
the value of [sref:`theme.colors.text.primary`].
- When the PR has requested changes, the icon is ![styled:`σ°`](. "warning-text") and the
color is the value of [sref:`theme.colors.text.warning`].
The heading for this column is ![styled:`σ°―’`]().
[sref:`theme.colors.text.faint`]: theme.colors.text.faint
[sref:`theme.colors.text.primary`]: theme.colors.text.primary
[sref:`theme.colors.text.warning`]: theme.colors.text.warning
ci:
title: PR Continuous Integration Column
description: Defines options for the ci column in a PR section.
type: object
oneOf:
- $ref: ./options.yaml
schematize:
weight: 9
skip_schema_render: true
format: yaml
details: |
This column displays the CI status of a PR as an icon:
- When the checks haven't finished running, the icon is ![styled:`ξ`](. "faint-text") and
the color is the value of [sref:`theme.colors.text.faint`].
- When the checks have all passed, the icon is ![styled:`ο`](. "success-text") and the
color is the value of [sref:`theme.colors.text.success`].
- When at least one check failed, the icon is ![styled:`σ°
`](. "warning-text") and the
color is the value of [sref:`theme.colors.text.warning`].
The heading for this column is ![styled:`ο`]().
[sref:`theme.colors.text.faint`]: theme.colors.text.faint
[sref:`theme.colors.text.success`]: theme.colors.text.success
[sref:`theme.colors.text.warning`]: theme.colors.text.warning
lines:
title: PR Lines Column
description: Defines options for the lines column in a PR section.
type: object
oneOf:
- $ref: ./options.yaml
schematize:
weight: 10
skip_schema_render: true
format: yaml
details: |
This column displays the line changes for a PR. The column represents the changes as
`<added> / -<removed>`. For example, ![styled:`66 / -46`]() indicates 66 lines added and 46
lines removed.
The heading for this column is ![styled:`ο`]().
default:
width: 16