@mattpolzin/harmony 2.6.2 → 3.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 +12 -8
- package/harmony +3071 -3501
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
# Harmony
|
|
3
3
|
Harmony is a small tool that helps teams keep GitHub reviews running smoothly. It takes the work out of picking someone from a pool of developers to review a new PR. Harmony does this by heuristically determining who on a particular GitHub Team has the least current/recent review workload.
|
|
4
4
|
|
|
5
|
+
Harmony offers a heuristic for PR assignments that is different than GitHub's round robin or weighted algorithms, but Harmony can also work well even if your team uses GitHub's automatic PR assignments ([see below](#deferring-to-github)).
|
|
6
|
+
|
|
5
7
|
## Dependencies
|
|
6
8
|
### Runtime
|
|
7
|
-
Running Harmony requires NodeJS
|
|
9
|
+
Running Harmony requires NodeJS 18+ (and a local installation of `git`) or alternatively Nix with flakes enabled.
|
|
8
10
|
|
|
9
11
|
If you'd like to try Harmony out without even "installing" it and you have Nix installed with flakes enabled, you can run it as `nix run github:mattpolzin/harmony`.
|
|
10
12
|
|
|
@@ -59,7 +61,7 @@ docker pull mattpolzin2/idris-docker:nightly
|
|
|
59
61
|
|
|
60
62
|
Then, from a directory containing this Harmony git repository, build Harmony:
|
|
61
63
|
```shell
|
|
62
|
-
docker run --rm -v "$(pwd):/build" mattpolzin2/idris-docker:nightly bash -c "cd /build && make"
|
|
64
|
+
docker run --rm -v "$(pwd):/build" mattpolzin2/idris-docker:nightly bash -c "apt-get update && apt-get install -y git && cd /build && make"
|
|
63
65
|
```
|
|
64
66
|
|
|
65
67
|
At this point you are done with Docker. From the same directory, install Harmony globally:
|
|
@@ -73,11 +75,10 @@ Set up Bash completion by adding the following to your Bash resource file or pro
|
|
|
73
75
|
eval "$(harmony --bash-completion-script)"
|
|
74
76
|
```
|
|
75
77
|
|
|
76
|
-
|
|
78
|
+
### Zsh completion
|
|
79
|
+
Zsh completion is supported via `bashcompinit` and can be loaded by adding the following to your Zsh resource file or profile:
|
|
77
80
|
```shell
|
|
78
|
-
|
|
79
|
-
autoload -U +X bashcompinit && bashcompinit
|
|
80
|
-
eval "$(harmony --bash-completion-script)"
|
|
81
|
+
eval "$(harmony --zsh-completion-script)"
|
|
81
82
|
```
|
|
82
83
|
|
|
83
84
|
## Usage
|
|
@@ -145,14 +146,15 @@ If `harmony config assignUsers` is `True` (defualt) then harmony will pick someo
|
|
|
145
146
|
|
|
146
147
|
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.
|
|
147
148
|
|
|
149
|
+
You can optionally apply any number of labels to the PR at the same time as assigning reviewers by prefixing the labels with '#'.
|
|
150
|
+
|
|
151
|
+
#### Deferring to GitHub
|
|
148
152
|
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:
|
|
149
153
|
```shell
|
|
150
154
|
harmony config assignTeams true
|
|
151
155
|
harmony config assignUsers false
|
|
152
156
|
```
|
|
153
157
|
|
|
154
|
-
You can optionally apply any number of labels to the PR at the same time as assigning reviewers by prefixing the labels with '#'.
|
|
155
|
-
|
|
156
158
|
#### Examples
|
|
157
159
|
Assign the most available reviewer from the "developers" GitHub Team:
|
|
158
160
|
```shell
|
|
@@ -227,6 +229,8 @@ Running `harmony health` will graph all open PRs grouped by the month when each
|
|
|
227
229
|
|
|
228
230
|
The idea is that a healthy repository does not have many old PRs still open because those PRs represent effort spent by developers that hasn't yet paid off.
|
|
229
231
|
|
|
232
|
+

|
|
233
|
+
|
|
230
234
|
### Sync
|
|
231
235
|
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.
|
|
232
236
|
|