@mattpolzin/harmony 5.5.0 → 5.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +286 -122
- package/harmony +826 -666
- package/man/harmony.1 +515 -0
- package/package.json +2 -1
package/man/harmony.1
ADDED
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
.\" Automatically generated by Pandoc 3.7.0.2
|
|
2
|
+
.\"
|
|
3
|
+
.TH "harmony" "1" "" "Version 5.6.0" "Harmony User\(cqs Guide"
|
|
4
|
+
.SH NAME
|
|
5
|
+
Harmony \- Harmonize with coworkers around GitHub reviewing
|
|
6
|
+
.SH SYNOPSIS
|
|
7
|
+
\f[CR]harmony branch\f[R]
|
|
8
|
+
.PD 0
|
|
9
|
+
.P
|
|
10
|
+
.PD
|
|
11
|
+
\f[CR]harmony config {property} [value]\f[R]
|
|
12
|
+
.PD 0
|
|
13
|
+
.P
|
|
14
|
+
.PD
|
|
15
|
+
\f[CR]harmony contribute [options] {uri | pr\-number}\f[R]
|
|
16
|
+
.PD 0
|
|
17
|
+
.P
|
|
18
|
+
.PD
|
|
19
|
+
\f[CR]harmony graph [options] {team\-slug}\f[R]
|
|
20
|
+
.PD 0
|
|
21
|
+
.P
|
|
22
|
+
.PD
|
|
23
|
+
\f[CR]harmony health\f[R]
|
|
24
|
+
.PD 0
|
|
25
|
+
.P
|
|
26
|
+
.PD
|
|
27
|
+
\f[CR]harmony help [subcommand]\f[R]
|
|
28
|
+
.PD 0
|
|
29
|
+
.P
|
|
30
|
+
.PD
|
|
31
|
+
\f[CR]harmony label {label} [...]\f[R]
|
|
32
|
+
.PD 0
|
|
33
|
+
.P
|
|
34
|
+
.PD
|
|
35
|
+
\f[CR]harmony list [team\-slug]\f[R]
|
|
36
|
+
.PD 0
|
|
37
|
+
.P
|
|
38
|
+
.PD
|
|
39
|
+
\f[CR]harmony pr [options]\f[R]
|
|
40
|
+
.PD 0
|
|
41
|
+
.P
|
|
42
|
+
.PD
|
|
43
|
+
\f[CR]harmony quick\f[R]
|
|
44
|
+
.PD 0
|
|
45
|
+
.P
|
|
46
|
+
.PD
|
|
47
|
+
\f[CR]harmony reflect\f[R]
|
|
48
|
+
.PD 0
|
|
49
|
+
.P
|
|
50
|
+
.PD
|
|
51
|
+
\f[CR]harmony request {team\-slug | +user\-login} [options]\f[R]
|
|
52
|
+
.PD 0
|
|
53
|
+
.P
|
|
54
|
+
.PD
|
|
55
|
+
\f[CR]harmony rq {team\-slug | +user\-login} [options]\f[R]
|
|
56
|
+
.PD 0
|
|
57
|
+
.P
|
|
58
|
+
.PD
|
|
59
|
+
\f[CR]harmony sync\f[R]
|
|
60
|
+
.PD 0
|
|
61
|
+
.P
|
|
62
|
+
.PD
|
|
63
|
+
\f[CR]harmony version\f[R]
|
|
64
|
+
.PD 0
|
|
65
|
+
.P
|
|
66
|
+
.PD
|
|
67
|
+
\f[CR]harmony whoami\f[R]
|
|
68
|
+
.SH DESCRIPTION
|
|
69
|
+
Harmony is a small tool that helps teams keep GitHub reviews running
|
|
70
|
+
smoothly.
|
|
71
|
+
It takes the work out of picking someone from a pool of developers to
|
|
72
|
+
review a new PR.
|
|
73
|
+
Harmony does this by heuristically determining who on a particular
|
|
74
|
+
GitHub Team has the least current/recent review workload.
|
|
75
|
+
.PP
|
|
76
|
+
Harmony offers a heuristic for PR review requests that is different than
|
|
77
|
+
GitHub\(cqs round robin or weighted algorithms, but Harmony can also
|
|
78
|
+
work well even if your team uses GitHub\(cqs automatic PR review
|
|
79
|
+
requests (see below).
|
|
80
|
+
.SS Dependencies
|
|
81
|
+
.SS Runtime
|
|
82
|
+
Running Harmony requires NodeJS 18+ (and a local installation of
|
|
83
|
+
\f[CR]git\f[R]) or alternatively Nix with flakes enabled.
|
|
84
|
+
.PP
|
|
85
|
+
If you\(cqd like to try Harmony out without even \(lqinstalling\(rq it
|
|
86
|
+
and you have Nix installed with flakes enabled, you can run it as
|
|
87
|
+
\f[CR]nix run github:mattpolzin/harmony\f[R].
|
|
88
|
+
.SS Build time
|
|
89
|
+
Building the latest commits of Harmony requires a HEAD build of the
|
|
90
|
+
Idris 2 compiler.
|
|
91
|
+
Each release page also indicates the version of Idris 2 that particular
|
|
92
|
+
release will build against.
|
|
93
|
+
.PP
|
|
94
|
+
Alternatively, you can build Harmony with Docker (see Docker Build).
|
|
95
|
+
.SS Installation
|
|
96
|
+
For any installation, you need to have a GitHub \c
|
|
97
|
+
.UR https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token
|
|
98
|
+
Personal Access Token
|
|
99
|
+
.UE \c
|
|
100
|
+
\&.
|
|
101
|
+
.PP
|
|
102
|
+
Your Personal Access Token should have the following permissions: \-
|
|
103
|
+
\f[CR]repo\f[R] (Full control of private repositories) \-
|
|
104
|
+
\f[CR]read:org\f[R] (Read org and team membership, read org projects) \-
|
|
105
|
+
\f[CR]read:user\f[R] \- \f[CR]user:email\f[R] \-
|
|
106
|
+
\f[CR]read:discussion\f[R] \- \f[CR]read:enterprise\f[R] (Read
|
|
107
|
+
enterprise profile data)
|
|
108
|
+
.PP
|
|
109
|
+
You can either add the PAT to your environment as the
|
|
110
|
+
\f[CR]GITHUB_PAT\f[R] (or alternatively \f[CR]GH_TOKEN\f[R]) variable
|
|
111
|
+
(perhaps exporting it from your shell resource file or profile) or you
|
|
112
|
+
can store your PAT in Harmony\(cqs config file.
|
|
113
|
+
The first time you start Harmony, it will ask you to configure your PAT
|
|
114
|
+
if you don\(cqt want to use the Environment variable.
|
|
115
|
+
You only need one of (a) the ENV var and (b) the config property and the
|
|
116
|
+
environment variable will take precedence if you have both set.
|
|
117
|
+
.SS NPM
|
|
118
|
+
You can install Harmony via npm directly by running
|
|
119
|
+
\f[CR]npm install \-g \(atmattpolzin/harmony\f[R].
|
|
120
|
+
.SS GitHub Release
|
|
121
|
+
You can install any Harmony release by downloading the
|
|
122
|
+
\f[CR]harmony\-npm.tar.gz\f[R] file from the GitHub Release page,
|
|
123
|
+
unzipping it, and running \f[CR]npm install \-\-global\f[R].
|
|
124
|
+
.SS Nix Flake
|
|
125
|
+
You can add Harmony to your Flake inputs as follows:
|
|
126
|
+
.IP
|
|
127
|
+
.EX
|
|
128
|
+
inputs = {
|
|
129
|
+
...
|
|
130
|
+
harmony.url = \(dqgithub:mattpolzin/harmony\(dq;
|
|
131
|
+
harmony.inputs.nixpkgs.follows = \(dqnixpkgs\(dq;
|
|
132
|
+
};
|
|
133
|
+
.EE
|
|
134
|
+
.PP
|
|
135
|
+
Then, in your outputs, bring Harmony into a package install list as
|
|
136
|
+
\f[CR]harmony.packages.<system>.harmony\f[R].
|
|
137
|
+
.PP
|
|
138
|
+
Harmony builds are cached in Cachix so you can take advantage of those
|
|
139
|
+
builds by adding \f[CR]https://gh\-harmony.cachix.org\f[R] to the list
|
|
140
|
+
of \f[CR]substituters\f[R] and
|
|
141
|
+
\f[CR]gh\-harmony.cachix.org\-1:KX5tTtEt3Y6an8pywe3Cy6jR9bUo+1Cl7hJmh+5eI4I=\f[R]
|
|
142
|
+
to the list of \f[CR]trusted\-public\-keys\f[R].
|
|
143
|
+
.SS From Source
|
|
144
|
+
The build script assumes a HEAD build of Idris 2 is installed on your
|
|
145
|
+
system.
|
|
146
|
+
For an alternative, see the Docker Build instructions below.
|
|
147
|
+
.PP
|
|
148
|
+
Build Harmony from source with a call to \f[CR]make\f[R].
|
|
149
|
+
Then install it globally with \f[CR]make install\f[R].
|
|
150
|
+
.SS Docker Build
|
|
151
|
+
If you want to build Harmony without installing Idris 2 on your system,
|
|
152
|
+
you can build Harmony within a Docker container and then install the
|
|
153
|
+
resulting Javascript onto your system.
|
|
154
|
+
.PP
|
|
155
|
+
First, download the latest nightly Docker image:
|
|
156
|
+
.IP
|
|
157
|
+
.EX
|
|
158
|
+
docker pull mattpolzin2/idris\-docker:nightly
|
|
159
|
+
.EE
|
|
160
|
+
.PP
|
|
161
|
+
Then, from a directory containing this Harmony git repository, build
|
|
162
|
+
Harmony:
|
|
163
|
+
.IP
|
|
164
|
+
.EX
|
|
165
|
+
docker run \-\-rm \-v \(dq$(pwd):/build\(dq \(rs
|
|
166
|
+
mattpolzin2/idris\-docker:nightly \(rs
|
|
167
|
+
bash \-c \(dqapt\-get update && apt\-get install \-y git && cd /build && make\(dq
|
|
168
|
+
.EE
|
|
169
|
+
.PP
|
|
170
|
+
At this point you are done with Docker.
|
|
171
|
+
From the same directory, install Harmony globally:
|
|
172
|
+
.IP
|
|
173
|
+
.EX
|
|
174
|
+
npm install \-\-global
|
|
175
|
+
.EE
|
|
176
|
+
.SS Bash completion
|
|
177
|
+
Set up Bash completion by adding the following to your Bash resource
|
|
178
|
+
file or profile:
|
|
179
|
+
.IP
|
|
180
|
+
.EX
|
|
181
|
+
eval \(dq$(harmony \-\-bash\-completion\-script)\(dq
|
|
182
|
+
.EE
|
|
183
|
+
.SS Zsh completion
|
|
184
|
+
Zsh completion is supported via \f[CR]bashcompinit\f[R] and can be
|
|
185
|
+
loaded by adding the following to your Zsh resource file or profile:
|
|
186
|
+
.IP
|
|
187
|
+
.EX
|
|
188
|
+
eval \(dq$(harmony \-\-zsh\-completion\-script)\(dq
|
|
189
|
+
.EE
|
|
190
|
+
.SS Usage
|
|
191
|
+
The first time you start Harmony in any particular folder, you will be
|
|
192
|
+
asked to provide some information about the GitHub repository you are
|
|
193
|
+
working with.
|
|
194
|
+
This information is stored in a file named \f[CR]harmony.json\f[R] in
|
|
195
|
+
the current working directory.
|
|
196
|
+
.PP
|
|
197
|
+
Note that the GitHub organization and repository are both slugs, not
|
|
198
|
+
names.
|
|
199
|
+
These are the values you find in a GitHub URL pointing to your
|
|
200
|
+
repository.
|
|
201
|
+
Harmony works with personal repositories but some of Harmony\(cqs
|
|
202
|
+
features are not available for these repos because they do not have
|
|
203
|
+
teams or members.
|
|
204
|
+
.IP
|
|
205
|
+
.EX
|
|
206
|
+
$ harmony sync
|
|
207
|
+
Creating a new configuration (storing in harmony.json)...
|
|
208
|
+
|
|
209
|
+
Harmony uses a GitHub Personal Access Token (PAT) to communicate with GitHub.
|
|
210
|
+
You can set this via the $GITHUB_PAT or $GH_TOKEN environment variables or a config property.
|
|
211
|
+
If you don\(aqt set in your config now, you can set later with \(gaharmony config githubPAT abcdefg\(ga.
|
|
212
|
+
The ENV var will always take precedence over the config property.
|
|
213
|
+
|
|
214
|
+
What PAT would you like to set in the config file (ENTER for default: unset)?
|
|
215
|
+
|
|
216
|
+
What GitHub org would you like to use harmony for (ENTER for default: myorg)?
|
|
217
|
+
|
|
218
|
+
What repository would you like to use harmony for (ENTER for default: myrepo)?
|
|
219
|
+
|
|
220
|
+
What GitHub remote repo would you like to use harmony for (ENTER for default: origin)?
|
|
221
|
+
|
|
222
|
+
Would you like harmony to comment when it requests reviewers? [Y/n]
|
|
223
|
+
Would you like harmony to request team reviews in addition to individuals when it requests reviewers? [Y/n]
|
|
224
|
+
Creating config...
|
|
225
|
+
.EE
|
|
226
|
+
.PP
|
|
227
|
+
Once configured, Harmony supports the following commands:
|
|
228
|
+
\f[CR]config\f[R], \f[CR]branch\f[R], \f[CR]pr\f[R], \f[CR]quick\f[R],
|
|
229
|
+
\f[CR]label\f[R], \f[CR]request\f[R] (also aliased to \f[CR]rq\f[R]),
|
|
230
|
+
\f[CR]contribute\f[R], \f[CR]whoami\f[R], \f[CR]reflect\f[R],
|
|
231
|
+
\f[CR]list\f[R], \f[CR]graph\f[R], \f[CR]health\f[R], and
|
|
232
|
+
\f[CR]sync\f[R].
|
|
233
|
+
.PP
|
|
234
|
+
\f[B]Note on color output:\f[R] Harmony uses colored output for some
|
|
235
|
+
commands.
|
|
236
|
+
You can adjust these colors slightly with the \f[CR]theme\f[R]
|
|
237
|
+
configuration option.
|
|
238
|
+
You can also use the \f[CR]NO_COLOR\f[R] environment variable to disable
|
|
239
|
+
all colored output.
|
|
240
|
+
Lastly, Harmony will avoid colored output when it determines
|
|
241
|
+
\f[CR]stdout\f[R] is not a TTY device (as is the case for
|
|
242
|
+
e.g.\ redirecting harmony output into a file or piping into
|
|
243
|
+
\f[CR]cat\f[R]: \f[CR]harmony ... | cat\f[R]).
|
|
244
|
+
.SH SUBCOMMANDS
|
|
245
|
+
.SS \f[CR]branch\f[R]
|
|
246
|
+
Print the URI for accessing the currently checked out branch on GitHub.
|
|
247
|
+
.PP
|
|
248
|
+
Many operating systems have an \f[CR]open\f[R] command (though the name
|
|
249
|
+
\(lqopen\(rq is not ubiquitous); this means you can run something like
|
|
250
|
+
\f[CR]open $(harmony branch)\f[R] to open a web browser to the current
|
|
251
|
+
branch on GitHub.
|
|
252
|
+
.SS \f[CR]config {property} [value]\f[R]
|
|
253
|
+
Read the given configuration property.
|
|
254
|
+
\f[CR]harmony config <property> <value>\f[R] will set the configuration
|
|
255
|
+
property.
|
|
256
|
+
.PP
|
|
257
|
+
Not all configuration properties can be read/set with this command.
|
|
258
|
+
.SS Properties
|
|
259
|
+
.TP
|
|
260
|
+
\f[CR]requestTeams\f[R] (\f[CR]true\f[R]/\f[CR]false\f[R])
|
|
261
|
+
When picking a reviewer from a team, request the team as a reviewer as
|
|
262
|
+
well.
|
|
263
|
+
.TP
|
|
264
|
+
\f[CR]requestUsers\f[R] (\f[CR]true\f[R]/\f[CR]false\f[R])
|
|
265
|
+
When requesting a team as a reviewer, pick a user to review as well.
|
|
266
|
+
.TP
|
|
267
|
+
\f[CR]commentOnRequest\f[R] (\f[CR]none\f[R]/\f[CR]name\f[R]/\f[CR]at\-mention\f[R])
|
|
268
|
+
When requesting a reviewer chosen by Harmony, comment on the pull
|
|
269
|
+
request or not.
|
|
270
|
+
.TP
|
|
271
|
+
\f[CR]branchParsing\f[R] (\f[CR]none\f[R]/\f[CR]jira\f[R]/\f[CR]github\f[R])
|
|
272
|
+
Optionally extract a Jira ticket slug or GitHub issue number from the
|
|
273
|
+
branch name and prepend it to the PR title or body to link the PR and
|
|
274
|
+
ticket/issue.
|
|
275
|
+
.TP
|
|
276
|
+
\f[CR]defaultRemote\f[R] (optional string)
|
|
277
|
+
When pushing new branches, what remote destination should be used.
|
|
278
|
+
.TP
|
|
279
|
+
\f[CR]mainBranch\f[R] (optional string)
|
|
280
|
+
When creating a PR, this is the default base branch.
|
|
281
|
+
.TP
|
|
282
|
+
\f[CR]theme\f[R] (\f[CR]dark\f[R]/\f[CR]light\f[R])
|
|
283
|
+
Use colors suited better for either a dark or light Terminal background.
|
|
284
|
+
.TP
|
|
285
|
+
\f[CR]githubPAT\f[R] (optional string)
|
|
286
|
+
If the \f[CR]$GITHUB_PAT\f[R] and \f[CR]$GH_TOKEN\f[R] environment
|
|
287
|
+
variables are not set, this Personal Access Token is used to
|
|
288
|
+
authenticate with GitHub.
|
|
289
|
+
.SS \f[CR]contribute [options]\f[R]
|
|
290
|
+
Print the URI of the oldest non\-draft PR waiting for your review.
|
|
291
|
+
If you are not requested for review on any PRs, Harmony will suggest a
|
|
292
|
+
PR that your review is not requested on.
|
|
293
|
+
.PP
|
|
294
|
+
You can skip PRs and retrieve the next\-oldest one by passing a dash
|
|
295
|
+
followed by the number to skip (e.g.\ \f[CR]\-2\f[R] to skip the two
|
|
296
|
+
oldest waiting PRs).
|
|
297
|
+
.PP
|
|
298
|
+
You can also more permanently ignore a particular PR (perhaps it has
|
|
299
|
+
gone stagnant but your org does not want to close it for whatever
|
|
300
|
+
reason).
|
|
301
|
+
To do this, use the \f[CR]\-\-ignore\f[R] or \f[CR]\-i\f[R] option and
|
|
302
|
+
pass it the GitHub URI or the Pull Request Number of a PR to ignore.
|
|
303
|
+
This PR will be omitted from consideration for the \f[CR]contribute\f[R]
|
|
304
|
+
command from then on.
|
|
305
|
+
This only impacts your local machine where the ignore list is stored in
|
|
306
|
+
Harmony\(cqs config file.
|
|
307
|
+
.PP
|
|
308
|
+
You can simultaneously get the URI for a PR to review and checkout the
|
|
309
|
+
branch needing review by passing the \f[CR]\-\-checkout\f[R] or
|
|
310
|
+
\f[CR]\-c\f[R] option to the \f[CR]contribute\f[R] command.
|
|
311
|
+
.PP
|
|
312
|
+
Many operating systems have an \f[CR]open\f[R] command (though the name
|
|
313
|
+
\(lqopen\(rq is not ubiquitous); this means you can run something like
|
|
314
|
+
\f[CR]open $(harmony contribute)\f[R] to open a web browser to the PR
|
|
315
|
+
that Harmony is suggesting.
|
|
316
|
+
.PP
|
|
317
|
+
You can also run \f[CR]harmony contribute \-\-list\f[R] if you want to
|
|
318
|
+
list out a few PRs to consider reviewing them instead of choosing just
|
|
319
|
+
one PR to look into and printing that PRs URI.
|
|
320
|
+
.SS Examples
|
|
321
|
+
Retrieve a URI for the oldest unreviewed and open PR (prioritizing PRs
|
|
322
|
+
for which you are a requested reviewer):
|
|
323
|
+
.IP
|
|
324
|
+
.EX
|
|
325
|
+
harmony contribute
|
|
326
|
+
.EE
|
|
327
|
+
.PP
|
|
328
|
+
Retrieve a URI for a PR to contribute a review, skipping over the first
|
|
329
|
+
3 suggestions:
|
|
330
|
+
.IP
|
|
331
|
+
.EX
|
|
332
|
+
harmony contribute \-3
|
|
333
|
+
.EE
|
|
334
|
+
.PP
|
|
335
|
+
Retrieve a URI for a PR to contribute a review and check the git branch
|
|
336
|
+
out as well:
|
|
337
|
+
.IP
|
|
338
|
+
.EX
|
|
339
|
+
harmony contribute \-\-checkout
|
|
340
|
+
.EE
|
|
341
|
+
.PP
|
|
342
|
+
Permanently ignore a PR by URI:
|
|
343
|
+
.IP
|
|
344
|
+
.EX
|
|
345
|
+
harmony contribute \-\-ignore https://github.com/myorg/myrepo/pull/1234
|
|
346
|
+
.EE
|
|
347
|
+
.PP
|
|
348
|
+
Permanently ignore a PR by its number:
|
|
349
|
+
.IP
|
|
350
|
+
.EX
|
|
351
|
+
harmony contribute \-\-ignore 1234
|
|
352
|
+
.EE
|
|
353
|
+
.SS \f[CR]graph [\-\-completed] {team\-slug}\f[R]
|
|
354
|
+
Graph the relative review workload of each of the members of the given
|
|
355
|
+
GitHub Team.
|
|
356
|
+
.PP
|
|
357
|
+
You can optionally graph completed PR reviews with the
|
|
358
|
+
\f[CR]\-\-completed\f[R] flag as well, though these are not considered
|
|
359
|
+
for Harmony\(cqs weighting algorithm for review workload.
|
|
360
|
+
.SS \f[CR]health\f[R]
|
|
361
|
+
Graph all open PRs grouped by the month when each was created.
|
|
362
|
+
.PP
|
|
363
|
+
The idea is that a healthy repository does not have many old PRs still
|
|
364
|
+
open because those PRs represent effort spent by developers that
|
|
365
|
+
hasn\(cqt yet paid off.
|
|
366
|
+
.SS \f[CR]help [subcommand]\f[R]
|
|
367
|
+
Print help.
|
|
368
|
+
.SS \f[CR]label {label} [...]\f[R]
|
|
369
|
+
Helps you create a PR if one does not exist yet and then it will apply
|
|
370
|
+
the given labels to the PR.
|
|
371
|
+
This is essentially an alias for the \f[CR]harmony pr\f[R] command but
|
|
372
|
+
without support for creating draft PRs.
|
|
373
|
+
.PP
|
|
374
|
+
Note that labels are \f[I]not\f[R] prefixed with `#' for this command.
|
|
375
|
+
There is no need to differentiate labels from other kinds of arguments
|
|
376
|
+
to \f[CR]harmony label\f[R].
|
|
377
|
+
.SS \f[CR]list [team\-slug]\f[R]
|
|
378
|
+
Running \f[CR]harmony list\f[R] will list all the teams for the
|
|
379
|
+
configured GitHub organization.
|
|
380
|
+
.PP
|
|
381
|
+
Running \f[CR]harmony list <team>\f[R] will list the members of the
|
|
382
|
+
given GitHub Team.
|
|
383
|
+
.SS \f[CR]pr [\-\-draft] [#label, ...]\f[R]
|
|
384
|
+
With a branch checked out will reach out to GitHub to determine if there
|
|
385
|
+
is an open PR for that branch.
|
|
386
|
+
If there is a PR, Harmony will print a URI that can be used to view the
|
|
387
|
+
PR.
|
|
388
|
+
If there is not a PR, Harmony will help you create one.
|
|
389
|
+
New and existing PRs can be marked as drafts by specifying the
|
|
390
|
+
\f[CR]\-\-draft\f[R] flag with the \f[CR]pr\f[R] command.
|
|
391
|
+
.PP
|
|
392
|
+
If you need to create a PR still, you will be prompted for a branch to
|
|
393
|
+
open the PR against (merge into, eventually), a title for the PR, and a
|
|
394
|
+
description for the PR.
|
|
395
|
+
If you have an \f[CR]EDITOR\f[R] environment variable set, Harmony will
|
|
396
|
+
use that editor to get the PR description from you.
|
|
397
|
+
If you have a PR template at
|
|
398
|
+
\f[CR].github/PULL_REQUEST_TEMPLATE.md\f[R], Harmony will also preload
|
|
399
|
+
that into your editor.
|
|
400
|
+
If you do not have an \f[CR]EDITOR\f[R] environment variable set, you
|
|
401
|
+
will still be able to enter a description from the command line but PR
|
|
402
|
+
templates are only supported when an \f[CR]EDITOR\f[R] is specified.
|
|
403
|
+
.PP
|
|
404
|
+
You can also specify any number of labels to apply by prefixing them
|
|
405
|
+
with `#'.
|
|
406
|
+
For example, \f[CR]harmony pr #backport #bugfix\f[R] would create a PR
|
|
407
|
+
and apply the \f[CR]backport\f[R] and \f[CR]bugfix\f[R] labels.
|
|
408
|
+
.PP
|
|
409
|
+
If you are using harmony from a script or some other environment without
|
|
410
|
+
TTY support, harmony will print a GitHub URL that can be used to create
|
|
411
|
+
the PR.
|
|
412
|
+
This mode of operation will ignore the \f[CR]\-\-draft\f[R] and
|
|
413
|
+
\f[CR]#label\f[R] options.
|
|
414
|
+
.PP
|
|
415
|
+
Many operating systems have an \f[CR]open\f[R] command (though the name
|
|
416
|
+
\(lqopen\(rq is not ubiquitous); this means you can run something like
|
|
417
|
+
\f[CR]open $(harmony pr)\f[R] to open a web browser to an existing PR
|
|
418
|
+
for the current branch.
|
|
419
|
+
.SS Examples
|
|
420
|
+
Create a draft pull request for the current branch:
|
|
421
|
+
.IP
|
|
422
|
+
.EX
|
|
423
|
+
harmony pr \-\-draft
|
|
424
|
+
.EE
|
|
425
|
+
.PP
|
|
426
|
+
Create a PR for the current branch and add the \f[CR]urgent\f[R] label:
|
|
427
|
+
.IP
|
|
428
|
+
.EX
|
|
429
|
+
harmony pr #urgent
|
|
430
|
+
.EE
|
|
431
|
+
.SS \f[CR]quick [\-\-bugfix]\f[R]
|
|
432
|
+
Helps you create a new GitHub issue and a branch to work on that issue
|
|
433
|
+
all in one go.
|
|
434
|
+
The branch name will be structured such that if you have GitHub branch
|
|
435
|
+
parsing on then the PR you create for the branch later on will refer to
|
|
436
|
+
the issue created now.
|
|
437
|
+
.PP
|
|
438
|
+
By default the branch created will be prefixed with \f[CR]feature\f[R]
|
|
439
|
+
but if you specify the \f[CR]\-\-bugfix\f[R] flag then the branch\(cqs
|
|
440
|
+
prefix will be \f[CR]bugfix\f[R].
|
|
441
|
+
.SS \f[CR]reflect\f[R]
|
|
442
|
+
Show a summary of your review requests and authored pull requests.
|
|
443
|
+
.SS \f[CR]request {team\-slug | +user\-login} [options]\f[R]
|
|
444
|
+
Helps you create a PR if one does not exist yet and then it will request
|
|
445
|
+
reviews from teams and/or users.
|
|
446
|
+
.PP
|
|
447
|
+
There is also a \f[CR]harmony rq\f[R] alias for
|
|
448
|
+
\f[CR]harmony request\f[R].
|
|
449
|
+
.PP
|
|
450
|
+
If \f[CR]harmony config requestUsers\f[R] is \f[CR]True\f[R] (defualt)
|
|
451
|
+
then harmony will pick someone to review the PR (from one of the listed
|
|
452
|
+
teams).
|
|
453
|
+
If \f[CR]harmony config requestTeams\f[R] is \f[CR]True\f[R] (default)
|
|
454
|
+
then harmony will request reviews from the teams you listed.
|
|
455
|
+
If \f[CR]harmony config commentOnRequest\f[R] is \f[CR]True\f[R] then
|
|
456
|
+
harmony will comment on the Pull Request indicating that teams & users
|
|
457
|
+
were \(lqharmoniously requested\(rq \(en this comment will \(atmention
|
|
458
|
+
requested users so it may be useful or annoying depending on the
|
|
459
|
+
requested user\(cqs GitHub notification settings.
|
|
460
|
+
.PP
|
|
461
|
+
You can also require that specific additional users (on top of the one
|
|
462
|
+
Harmony will pick for you) are requested to review the PR.
|
|
463
|
+
You do this by specifying those users\(cq logins prefixed with `+' as
|
|
464
|
+
arguments to Harmony.
|
|
465
|
+
This will request review from those specific additional users regardless
|
|
466
|
+
of the \f[CR]requestUsers\f[R] setting; that setting controls whether
|
|
467
|
+
Harmony picks users from each Team you specify to review PRs.
|
|
468
|
+
.PP
|
|
469
|
+
You can optionally apply any number of labels to the PR at the same time
|
|
470
|
+
as requesting reviewers by prefixing the labels with `#'.
|
|
471
|
+
.SS Deferring to GitHub
|
|
472
|
+
If your team has GitHub set up to auto\-request reviews from individuals
|
|
473
|
+
when a team is requested for review, you probably want to tell harmony
|
|
474
|
+
not to also pick someone using its heuristics.
|
|
475
|
+
You can run the following \f[CR]config\f[R] commands to tell harmony to
|
|
476
|
+
request a team but not also pick an individual from that team:
|
|
477
|
+
.IP
|
|
478
|
+
.EX
|
|
479
|
+
harmony config requestTeams true
|
|
480
|
+
harmony config requestUsers false
|
|
481
|
+
.EE
|
|
482
|
+
.PP
|
|
483
|
+
This does not prevent you from requesting specific individuals with the
|
|
484
|
+
\f[CR]+<user>\f[R] syntax described above.
|
|
485
|
+
.SS Examples
|
|
486
|
+
Request review from the most available reviewer from the
|
|
487
|
+
\(lqdevelopers\(rq GitHub Team:
|
|
488
|
+
.IP
|
|
489
|
+
.EX
|
|
490
|
+
harmony request developers
|
|
491
|
+
.EE
|
|
492
|
+
.PP
|
|
493
|
+
Request review from the most available reviewer from either the
|
|
494
|
+
\(lqfrontend\(rq or \(lqbackend\(rq GitHub Team:
|
|
495
|
+
.IP
|
|
496
|
+
.EX
|
|
497
|
+
harmony request frontend backend
|
|
498
|
+
.EE
|
|
499
|
+
.PP
|
|
500
|
+
Request review from the most available reviewer from the \(lqweb\(rq
|
|
501
|
+
team and additionally request review from the users with logins
|
|
502
|
+
\(lqcarl001\(rq and \(lqemmaham\(rq:
|
|
503
|
+
.IP
|
|
504
|
+
.EX
|
|
505
|
+
harmony request web +carl001 +emmaham
|
|
506
|
+
.EE
|
|
507
|
+
.SS \f[CR]sync\f[R]
|
|
508
|
+
Sync the locally configured team slugs and user logins that are used by
|
|
509
|
+
auto\-completion for Harmony.
|
|
510
|
+
This sync is also performed automatically the first time you run Harmony
|
|
511
|
+
after more than a day without the configuration being synced.
|
|
512
|
+
.SS \f[CR]version\f[R]
|
|
513
|
+
Print Harmony\(cqs version.
|
|
514
|
+
.SS \f[CR]whoami\f[R]
|
|
515
|
+
Print information about the currently configured and authenticated user.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mattpolzin/harmony",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.6.0",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=18.0.0"
|
|
6
6
|
},
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"bin": {
|
|
24
24
|
"harmony": "harmony"
|
|
25
25
|
},
|
|
26
|
+
"man": "./man/harmony.1",
|
|
26
27
|
"scripts": {},
|
|
27
28
|
"author": "Mathew Polzin",
|
|
28
29
|
"license": "MIT",
|