@mattpolzin/harmony 1.3.0 → 2.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.
- harmony-npm/README.md +28 -15
- harmony-npm/harmony +4118 -4156
- harmony-npm/package.json +3 -3
harmony-npm/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Harmony is a small tool that helps teams keep GitHub reviews running smoothly. I
|
|
|
4
4
|
|
|
5
5
|
## Dependencies
|
|
6
6
|
### Runtime
|
|
7
|
-
Running Harmony only requires NodeJS
|
|
7
|
+
Running Harmony only requires NodeJS 14+ (and a local installation of `git`).
|
|
8
8
|
### Build time
|
|
9
9
|
Building the latest commits of Harmony requires a HEAD build of the Idris 2 compiler. Each release page also indicates the version of Idris 2 that particular release will build against.
|
|
10
10
|
|
|
@@ -30,7 +30,7 @@ You can install Harmony via npm directly by running `npm install -g @mattpolzin/
|
|
|
30
30
|
You can install any Harmony release by downloading the `harmony-npm.tar.gz` file from the GitHub Release page, unzipping it, and running `npm install --global`.
|
|
31
31
|
|
|
32
32
|
### From Source
|
|
33
|
-
The
|
|
33
|
+
The build script assumes a HEAD build of Idris 2 is installed on your system. For an alternative, see the [Docker Build](#docker-build) instructions below.
|
|
34
34
|
|
|
35
35
|
Build Harmony from source with a call to `make`. Then install it globally with `make install`.
|
|
36
36
|
|
|
@@ -91,7 +91,18 @@ Would you like harmony to assign teams in addition to individuals when it assign
|
|
|
91
91
|
Creating config...
|
|
92
92
|
```
|
|
93
93
|
|
|
94
|
-
Once configured, Harmony supports the following commands: `branch`, `pr`, `assign`, `contribute`, `whoami`, `reflect`, `list`, `graph`,
|
|
94
|
+
Once configured, Harmony supports the following commands: `config`, `branch`, `pr`, `label`, `assign`, `contribute`, `whoami`, `reflect`, `list`, `graph`, and `sync`.
|
|
95
|
+
|
|
96
|
+
### Config
|
|
97
|
+
Running `harmony config <property>` will read the given configuration property. `harmony config <property> <value>` will set the configuration property.
|
|
98
|
+
|
|
99
|
+
Not all configuration properties can be read/set with this command.
|
|
100
|
+
#### Properties
|
|
101
|
+
- `assignTeams` (`true`/`false`) -- When picking a reviewer from a team, assign the team as a reviewer as well.
|
|
102
|
+
- `assignUsers` (`true`/`false`) -- When assigning a team as a reviewer, pick a user to review as well.
|
|
103
|
+
- `commentOnAssign` (`true`/`false`) -- When assigning a reviewer chosen by Harmony, comment on the pull request.
|
|
104
|
+
- `defaultRemote` (optional string) -- When pushing new branches, what remote destination should be used.
|
|
105
|
+
- `githubPAT` (optional string) -- If the `$GITHUB_PAT` environment variable is not set, this Personal Access Token is used to authenticate with GitHub.
|
|
95
106
|
|
|
96
107
|
### Branch
|
|
97
108
|
Running `harmony branch` will print the URI for accessing the currently checked out branch on GitHub.
|
|
@@ -105,11 +116,24 @@ If you need to create a PR still, you will be prompted for a branch to open the
|
|
|
105
116
|
|
|
106
117
|
Many operating systems have an `open` command (though the name "open" is not ubiquitous); this means you can run something like `open $(harmony pr)` to open a web browser to an existing PR for the current branch.
|
|
107
118
|
|
|
119
|
+
### Label
|
|
120
|
+
Running `harmony label {<label>} [...]` will help you create a PR if one does not exist yet and then it will apply the given labels to the PR.
|
|
121
|
+
|
|
108
122
|
### Assign
|
|
109
|
-
Running `harmony assign {<team> | +<user>} [...]` will help you create a PR if one does not exist yet and then it will
|
|
123
|
+
Running `harmony assign {<team> | +<user>} [#<label>] [...]` will help you create a PR if one does not exist yet and then it will assign teams and/or users to the PR.
|
|
124
|
+
|
|
125
|
+
If `harmony config assignUsers` is `True` (defualt) then harmony will pick someone to review the PR (from one of the listed teams) and assign them to the PR. If `harmony config assignTeams` is `True` then harmony will assign the teams you listed as reviewers of the PR. If `harmony config commentOnAssign` is `True` then harmony will comment on the Pull Request indicating that teams & users were "harmoniously assigned" -- this comment will @mention assigned users so it may be useful or annoying depending on the assigned user's GitHub notification settings.
|
|
110
126
|
|
|
111
127
|
You can also require that specific additional users (on top of the one Harmony will pick for you) are assigned to the PR. You do this by specifying those users' logins prefixed with '+' as arguments to Harmony.
|
|
112
128
|
|
|
129
|
+
If your team has GitHub set up to auto-assign individuals when a team is requested for review, you probably want to tell harmony not to also pick someone using its heuristics. You can run the following `config` commands to tell harmony to assign a team but not also pick an individual from that team:
|
|
130
|
+
```shell
|
|
131
|
+
harmony config assignTeams true
|
|
132
|
+
harmony config assignUsers false
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
You can optionally apply any number of labels to the PR at the same time as assigning reviewers by prefixing the labels with '#'.
|
|
136
|
+
|
|
113
137
|
#### Examples
|
|
114
138
|
Assign the most available reviewer from the "developers" GitHub Team:
|
|
115
139
|
```shell
|
|
@@ -165,17 +189,6 @@ Running `harmony graph <team>` will graph the relative review workload of each o
|
|
|
165
189
|
|
|
166
190
|
You can optionally graph completed PR reviews with the `--completed` flag as well, though these are not considered for Harmony's weighting algorithm for review workload.
|
|
167
191
|
|
|
168
|
-
### Config
|
|
169
|
-
Running `harmony config <property>` will read the given configuration property. `harmony config <property> <value>` will set the configuration property.
|
|
170
|
-
|
|
171
|
-
Not all configuration properties can be read/set with this command.
|
|
172
|
-
#### Properties
|
|
173
|
-
- `assignTeams` -- When picking a reviewer from a team, assign the team as a reviewer as well.
|
|
174
|
-
- `assignUsers` -- When assigning a team as a reviewer, pick a user to review as well.
|
|
175
|
-
- `commentOnAssign` -- When assigning a reviewer chosen by Harmony, comment on the pull request.
|
|
176
|
-
- `defaultRemote` -- When pushing new branches, what remote destination should be used.
|
|
177
|
-
- `githubPAT` -- If the `$GITHUB_PAT` environment variable is not set, this Personal Access Token is used to authenticate with GitHub.
|
|
178
|
-
|
|
179
192
|
### Sync
|
|
180
193
|
Running `harmony sync` will sync the locally configured team slugs and user logins that are used by auto-completion for Harmony. This sync is also performed automatically the first time you run Harmony after more than a day without the configuration being synced.
|
|
181
194
|
|