-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gertty.yaml
162 lines (149 loc) · 5.39 KB
/
.gertty.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
# This is an example ~/.gertty.yaml file for use with OpenStack's
# Gerrit. Most of these options are not required, rather, they
# customize Gertty to better deal with the particulars of OpenStack's
# Gerrit configuration.
# This file does not list all of the available options. For a full
# list with explanations, see the 'reference-gertty.yaml' file.
servers:
- name: openstack
url: https://review.openstack.org/
# Your gerrit username.
username: USERNAMEHERE
# Set password at https://review.openstack.org/#/settings/http-password
# Note this is not your launchpad password.
password: PASSWORDHERE
git-root: ~/src/
# This section adds the colors that we will reference later in the
# commentlinks section for test results. You can also change other
# colors here.
palettes:
- name: default
test-SUCCESS: ['light green', '']
test-FAILURE: ['light red', '']
test-UNSTABLE: ['yellow', '']
# Uncomment the next line if your terminal has a white background
# palette: light
keymaps:
- name: brad
quit: [[':', 'q']]
cursor-left: 'h'
cursor-down: 'j'
cursor-up: 'k'
cursor-right: 'l'
toggle-hidden: 'K'
keymap: brad
change-list-options:
sort-by: 'updated'
reverse: True
# Commentlinks are regexes that are applied to commit and review
# messages. They can be replaced with internal or external links, or
# have colors applied.
commentlinks:
# This matches the job results left by Zuul.
- match: "^- (?P<job>.*?) (?P<url>.*?) : (?P<result>[^ ]+) ?(?P<comment>.*)$"
# This indicates that this is a test result, and should be indexed
# using the "job" match group from the commentlink regex. Gertty
# displays test results in their own area of the screen.
test-result: "{job}"
replacements:
# Replace the matching text with a hyperlink to the "url" match
# group whose text is the "job" match group.
- link:
text: "{job:<42}"
url: "{url}"
# Follow that with the plain text of the "result" match group
# with the color "test-{result}" applied. See the palette
# section above.
- text:
color: "test-{result}"
text: "{result} "
# And then follow that with the plain text of the "comment"
# match group.
- text: "{comment}"
# Match Gerrit change ids, and replace them with a link to an
# internal Gertty search for that change id.
- match: "(?P<id>I[0-9a-fA-F]{40})"
replacements:
- search:
text: "{id}"
query: "change:{id}"
# Match external references to bugs on Launchpad
- match: "(?P<bug_str>(?:[Cc]loses|[Pp]artial|[Rr]elated)-[Bb]ug *: *#?(?P<bug_id>\\d+))"
replacements:
- link:
text: "{bug_str}"
url: "https://launchpad.net/bugs/{bug_id}"
# Match external references to blueprints on Launchpad
- match: "blueprint +(?P<blueprint>[\\w\\-.]+)"
replacements:
- link:
text: "blueprint {blueprint}"
url: "https://blueprints.launchpad.net/openstack/?searchtext={blueprint}"
# This is the query used for the list of changes when a project is
# selected. The default is "status:open". If you don't want to see
# changes which are WIP or have verification failures, use a query like this:
# change-list-query: "status:open not label:Workflow=-1"
# If you also want to exclude reviews with failed tests, the query is slightly
# more complex:
# "status:open not (label:Workflow=-1 or label:Verified=-1)"
# Uncomment the following line to use a unified diff view instead of the
# default side-by-side:
# diff-view: unified
# Hide comments by default that match the following criteria.
# You can toggle their display with 't'.
hide-comments:
- author: "^(.*CI|Jenkins|Zuul)$"
# This section defines customized dashboards. You can supply any
# Gertty search string and bind them to any key. They will appear in
# the global help text, and pressing the key anywhere in Gertty will
# discard the current display stack and replace it with the results of
# the query.
#
# NB: "recentlyseen:24 hours" does not just return changes seen in the
# last 24 hours -- it returns changes seen within 24 hours of the most
# recently seen change. So you can take the weekend off and pick up
# where you were.
dashboards:
- name: "My changes"
query: "owner:self status:open"
key: "f2"
sort-by: "updated"
reverse: True
- name: "Incoming reviews"
query: "is:open is:reviewer"
key: "f3"
sort-by: "updated"
reverse: True
- name: "Starred changes"
query: "is:starred"
key: "f4"
sort-by: "updated"
reverse: True
- name: "Recently seen changes"
query: "recentlyseen:24 hours"
sort-by: "last-seen"
reverse: True
key: "f5"
# Reviewkeys are hotkeys that perform immediate reviews within the
# change screen. Any pending comments or review messages will be
# attached to the review; otherwise an empty review will be left. The
# approvals list is exhaustive, so if you specify an empty list,
# Gertty will submit a review that clears any previous approvals.
# They will appear in the help text for the change screen.
reviewkeys:
- key: 'meta 0'
approvals: []
- key: 'meta 1'
approvals:
- category: 'Code-Review'
value: 1
- key: 'meta 2'
approvals:
- category: 'Code-Review'
value: 2
- key: 'meta 3'
approvals:
- category: 'Code-Review'
value: 2
- category: 'Workflow'
value: 1