@mattpolzin/harmony 2.6.1 → 3.0.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.
Files changed (3) hide show
  1. package/README.md +25 -5
  2. package/harmony +2223 -2643
  3. package/package.json +6 -3
package/README.md CHANGED
@@ -2,9 +2,14 @@
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 only requires NodeJS 14+ (and a local installation of `git`).
9
+ Running Harmony requires NodeJS 18+ (and a local installation of `git`) or alternatively Nix with flakes enabled.
10
+
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`.
12
+
8
13
  ### Build time
9
14
  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
15
 
@@ -29,6 +34,18 @@ You can install Harmony via npm directly by running `npm install -g @mattpolzin/
29
34
  ### GitHub Release
30
35
  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
36
 
37
+ ### Nix Flake
38
+ You can add Harmony to your Flake inputs as follows:
39
+ ```nix
40
+ inputs = {
41
+ ...
42
+ harmony.url = "github:mattpolzin/harmony";
43
+ harmony.inputs.nixpkgs.follows = "nixpkgs";
44
+ };
45
+ ```
46
+
47
+ Then, in your outputs, bring Harmony into a package install list as `harmony.packages.<system>.harmony`.
48
+
32
49
  ### From Source
33
50
  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
51
 
@@ -44,7 +61,7 @@ docker pull mattpolzin2/idris-docker:nightly
44
61
 
45
62
  Then, from a directory containing this Harmony git repository, build Harmony:
46
63
  ```shell
47
- 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"
48
65
  ```
49
66
 
50
67
  At this point you are done with Docker. From the same directory, install Harmony globally:
@@ -130,14 +147,15 @@ If `harmony config assignUsers` is `True` (defualt) then harmony will pick someo
130
147
 
131
148
  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.
132
149
 
150
+ You can optionally apply any number of labels to the PR at the same time as assigning reviewers by prefixing the labels with '#'.
151
+
152
+ #### Deferring to GitHub
133
153
  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:
134
154
  ```shell
135
155
  harmony config assignTeams true
136
156
  harmony config assignUsers false
137
157
  ```
138
158
 
139
- You can optionally apply any number of labels to the PR at the same time as assigning reviewers by prefixing the labels with '#'.
140
-
141
159
  #### Examples
142
160
  Assign the most available reviewer from the "developers" GitHub Team:
143
161
  ```shell
@@ -155,7 +173,7 @@ harmony assign web +carl001 +emmaham
155
173
  ```
156
174
 
157
175
  ### Contribute
158
- Running `harmony contribute` will print the URI of the oldest PR waiting for your review. If you are not requested for review on any PRs, Harmony will suggest a PR that you are not assigned to.
176
+ Running `harmony contribute` will print the URI of the oldest non-draft PR waiting for your review. If you are not requested for review on any PRs, Harmony will suggest a PR that you are not assigned to.
159
177
 
160
178
  You can skip PRs and retrieve the next-oldest one by passing a dash followed by the number to skip (e.g. `-2` to skip the two oldest waiting PRs).
161
179
 
@@ -197,6 +215,8 @@ Running `harmony whoami` will print information about the currently configured a
197
215
  ### Reflect
198
216
  Running `harmony reflect` will show a summary of your review requests and authored pull requests.
199
217
 
218
+ ![Reflect Screenshot](./docs/images/reflect.png)
219
+
200
220
  ### List
201
221
  Running `harmony list <team>` will list the members of the given GitHub Team.
202
222