@mattpolzin/harmony 5.8.0 → 6.1.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 +46 -27
- package/harmony +3429 -2841
- package/man/harmony.1 +32 -85
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
<!--
|
|
2
|
+
This file is auto-generated.
|
|
3
|
+
|
|
4
|
+
Edit the files in the `docs/` directory and run `make README.md` and `make
|
|
5
|
+
manpage` to regenerate those respective files.
|
|
6
|
+
-->
|
|
2
7
|
|
|
3
8
|
# NAME
|
|
4
9
|
Harmony - Harmonize with coworkers around GitHub reviewing
|
|
@@ -48,25 +53,16 @@ particular release will build against.
|
|
|
48
53
|
Alternatively, you can build Harmony with Docker (see
|
|
49
54
|
[Docker Build](#docker-build)).
|
|
50
55
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
- `
|
|
57
|
-
- `read:org` (Read org and team membership, read org projects)
|
|
58
|
-
- `read:user`
|
|
59
|
-
- `user:email`
|
|
60
|
-
- `read:discussion`
|
|
61
|
-
- `read:enterprise` (Read enterprise profile data)
|
|
56
|
+
### Testing
|
|
57
|
+
Tests can be run with `make test`. You'll need a few common tools in your `PATH`
|
|
58
|
+
to run all the tests:
|
|
59
|
+
- `realpath`
|
|
60
|
+
- `sed`
|
|
61
|
+
- `xargs`
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
The first time you start Harmony, it will ask you to configure your PAT if you
|
|
67
|
-
don't want to use the Environment variable. You only need one of (a) the ENV var
|
|
68
|
-
and (b) the config property and the environment variable will take precedence if
|
|
69
|
-
you have both set.
|
|
63
|
+
## Installation
|
|
64
|
+
You can install Harmony in several different ways, though by far the easiest is
|
|
65
|
+
to install it via the Node Package Manager (NPM).
|
|
70
66
|
|
|
71
67
|
### NPM
|
|
72
68
|
You can install Harmony via npm directly by running
|
|
@@ -124,21 +120,40 @@ globally:
|
|
|
124
120
|
npm install --global
|
|
125
121
|
```
|
|
126
122
|
|
|
127
|
-
|
|
123
|
+
## Bash completion
|
|
128
124
|
Set up Bash completion by adding the following to your Bash resource file or
|
|
129
125
|
profile:
|
|
130
126
|
```shell
|
|
131
127
|
eval "$(harmony --bash-completion-script)"
|
|
132
128
|
```
|
|
133
129
|
|
|
134
|
-
|
|
130
|
+
## Zsh completion
|
|
135
131
|
Zsh completion is supported via `bashcompinit` and can be loaded by adding the
|
|
136
132
|
following to your Zsh resource file or profile:
|
|
137
133
|
```shell
|
|
138
134
|
eval "$(harmony --zsh-completion-script)"
|
|
139
135
|
```
|
|
140
136
|
|
|
141
|
-
##
|
|
137
|
+
## Initial configuration
|
|
138
|
+
For most things harmony does, you need to have a GitHub
|
|
139
|
+
[Personal Access Token](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token).
|
|
140
|
+
|
|
141
|
+
Your Personal Access Token should have the following permissions:
|
|
142
|
+
- `repo` (Full control of private repositories)
|
|
143
|
+
- `read:org` (Read org and team membership, read org projects)
|
|
144
|
+
- `read:user`
|
|
145
|
+
- `user:email`
|
|
146
|
+
- `read:discussion`
|
|
147
|
+
- `read:enterprise` (Read enterprise profile data)
|
|
148
|
+
|
|
149
|
+
You can either add the PAT to your environment as the `GITHUB_PAT` (or
|
|
150
|
+
alternatively `GH_TOKEN`) variable (perhaps exporting it from your shell
|
|
151
|
+
resource file or profile) or you can store your PAT in Harmony's config file.
|
|
152
|
+
The first time you start Harmony, it will ask you to configure your PAT if you
|
|
153
|
+
don't want to use the Environment variable. You only need one of (a) the ENV var
|
|
154
|
+
and (b) the config property and the environment variable will take precedence if
|
|
155
|
+
you have both set.
|
|
156
|
+
|
|
142
157
|
The first time you start Harmony in any particular folder, you will be asked to
|
|
143
158
|
provide some information about the GitHub repository you are working with. This
|
|
144
159
|
information is stored in a file named `harmony.json` in the current working
|
|
@@ -170,9 +185,10 @@ Would you like harmony to request team reviews in addition to individuals when i
|
|
|
170
185
|
Creating config...
|
|
171
186
|
```
|
|
172
187
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
`
|
|
188
|
+
## Usage
|
|
189
|
+
Once configured, Harmony supports the following commands that are documented
|
|
190
|
+
below: `config`, `branch`, `pr`, `quick`, `label`, `request` (also aliased to
|
|
191
|
+
`rq`), `contribute`, `whoami`, `reflect`, `list`, `graph`, `health`, and `sync`.
|
|
176
192
|
|
|
177
193
|
**Note on color output:**
|
|
178
194
|
Harmony uses colored output for some commands. You can adjust these colors
|
|
@@ -293,6 +309,7 @@ Graph all open PRs grouped by the month when each was created.
|
|
|
293
309
|
The idea is that a healthy repository does not have many old PRs still open
|
|
294
310
|
because those PRs represent effort spent by developers that hasn't yet paid off.
|
|
295
311
|
|
|
312
|
+
<!-- image location is intentionally relative to repository root -->
|
|
296
313
|

|
|
297
314
|
|
|
298
315
|
## `help [subcommand]`
|
|
@@ -312,12 +329,13 @@ organization.
|
|
|
312
329
|
|
|
313
330
|
Running `harmony list <team>` will list the members of the given GitHub Team.
|
|
314
331
|
|
|
315
|
-
## `pr [--draft] [-i/--into {<branch-name>}] [#label, ...]`
|
|
332
|
+
## `pr [--draft | --ready] [-i/--into {<branch-name>}] [#label, ...]`
|
|
316
333
|
With a branch checked out will reach out to GitHub to determine if there is an
|
|
317
334
|
open PR for that branch. If there is a PR, Harmony will print a URI that can be
|
|
318
335
|
used to view the PR. If there is not a PR, Harmony will help you create one. New
|
|
319
336
|
and existing PRs can be marked as drafts by specifying the `--draft` flag with
|
|
320
|
-
the `pr` command
|
|
337
|
+
the `pr` command or they can be marked as ready for review with the `--ready`
|
|
338
|
+
flag. The default behavior for new PRs is to mark them ready.
|
|
321
339
|
|
|
322
340
|
If you need to create a PR still, you will be prompted for a branch to open the
|
|
323
341
|
PR against (merge into, eventually), a title for the PR, and a description for
|
|
@@ -382,6 +400,7 @@ description.
|
|
|
382
400
|
## `reflect`
|
|
383
401
|
Show a summary of your review requests and authored pull requests.
|
|
384
402
|
|
|
403
|
+
<!-- image location is intentionally relative to repository root -->
|
|
385
404
|

|
|
386
405
|
|
|
387
406
|
## `request {team-slug | +user-login} [options]`
|