@mattpolzin/harmony 3.3.0 → 4.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 +24 -23
  2. package/harmony +583 -492
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -2,7 +2,7 @@
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)).
5
+ Harmony offers a heuristic for PR review requests 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 review requests ([see below](#deferring-to-github)).
6
6
 
7
7
  ## Dependencies
8
8
  ### Runtime
@@ -102,21 +102,21 @@ What repository would you like to use harmony for (ENTER for default: myrepo)?
102
102
 
103
103
  What GitHub remote repo would you like to use harmony for (ENTER for default: origin)?
104
104
 
105
- Would you like harmony to comment when it assigns reviewers? [Y/n]
106
- Would you like harmony to assign teams in addition to individuals when it assigns reviewers? [Y/n]
105
+ Would you like harmony to comment when it requests reviewers? [Y/n]
106
+ Would you like harmony to request team reviews in addition to individuals when it requests reviewers? [Y/n]
107
107
  Creating config...
108
108
  ```
109
109
 
110
- Once configured, Harmony supports the following commands: `config`, `branch`, `pr`, `label`, `assign`, `contribute`, `whoami`, `reflect`, `list`, `graph`, `health`, and `sync`.
110
+ Once configured, Harmony supports the following commands: `config`, `branch`, `pr`, `label`, `request`, `contribute`, `whoami`, `reflect`, `list`, `graph`, `health`, and `sync`.
111
111
 
112
112
  ### Config
113
113
  Running `harmony config <property>` will read the given configuration property. `harmony config <property> <value>` will set the configuration property.
114
114
 
115
115
  Not all configuration properties can be read/set with this command.
116
116
  #### Properties
117
- - `assignTeams` (`true`/`false`) -- When picking a reviewer from a team, assign the team as a reviewer as well.
118
- - `assignUsers` (`true`/`false`) -- When assigning a team as a reviewer, pick a user to review as well.
119
- - `commentOnAssign` (`true`/`false`) -- When assigning a reviewer chosen by Harmony, comment on the pull request.
117
+ - `requestTeams` (`true`/`false`) -- When picking a reviewer from a team, request the team as a reviewer as well.
118
+ - `requestUsers` (`true`/`false`) -- When requesting a team as a reviewer, pick a user to review as well.
119
+ - `commentOnRequest` (`true`/`false`) -- When requesting a reviewer chosen by Harmony, comment on the pull request.
120
120
  - `defaultRemote` (optional string) -- When pushing new branches, what remote destination should be used.
121
121
  - `githubPAT` (optional string) -- If the `$GITHUB_PAT` environment variable is not set, this Personal Access Token is used to authenticate with GitHub.
122
122
 
@@ -139,40 +139,41 @@ Running `harmony label {<label>} [...]` will help you create a PR if one does no
139
139
 
140
140
  Note that labels are _not_ prefixed with '#' for this command. There is no need to differentiate labels from other kinds of arguments to `harmony label`.
141
141
 
142
- ### Assign
143
- 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.
142
+ ### Request
143
+ Running `harmony request {<team> | +<user>} [#<label>] [...]` will help you create a PR if one does not exist yet and then it will request reviews from teams and/or users.
144
144
 
145
- 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.
145
+ If `harmony config requestUsers` is `True` (defualt) then harmony will pick someone to review the PR (from one of the listed teams). If `harmony config requestTeams` is `True` (default) then harmony will request reviews from the teams you listed. If `harmony config commentOnRequest` is `True` then harmony will comment on the Pull Request indicating that teams & users were "harmoniously requested" -- this comment will @mention requested users so it may be useful or annoying depending on the requested user's GitHub notification settings.
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
+ You can also require that specific additional users (on top of the one Harmony will pick for you) are requested to review the PR. You do this by specifying those users' logins prefixed with '+' as arguments to Harmony. This will request review from those specific additional users regardless of the `requestUsers` setting; that setting controls whether Harmony picks users from each Team you specify to review PRs.
148
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 '#'.
149
+ You can optionally apply any number of labels to the PR at the same time as requesting reviewers by prefixing the labels with '#'.
150
150
 
151
151
  #### Deferring to GitHub
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:
152
+ If your team has GitHub set up to auto-request reviews from 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 request a team but not also pick an individual from that team:
153
153
  ```shell
154
- harmony config assignTeams true
155
- harmony config assignUsers false
154
+ harmony config requestTeams true
155
+ harmony config requestUsers false
156
156
  ```
157
+ This does not prevent you from requesting specific individuals with the `+<user>` syntax described above.
157
158
 
158
159
  #### Examples
159
- Assign the most available reviewer from the "developers" GitHub Team:
160
+ Request review from the most available reviewer from the "developers" GitHub Team:
160
161
  ```shell
161
- harmony assign developers
162
+ harmony request developers
162
163
  ```
163
164
 
164
- Assign the most available reviewer from either the "frontend" or "backend" GitHub Team:
165
+ Request review from the most available reviewer from either the "frontend" or "backend" GitHub Team:
165
166
  ```shell
166
- harmony assign frontend backend
167
+ harmony request frontend backend
167
168
  ```
168
169
 
169
- Assign the most available reviewer from the "web" team and additionally assign the users with logins "carl001" and "emmaham":
170
+ Request review from the most available reviewer from the "web" team and additionally request review from the users with logins "carl001" and "emmaham":
170
171
  ```shell
171
- harmony assign web +carl001 +emmaham
172
+ harmony request web +carl001 +emmaham
172
173
  ```
173
174
 
174
175
  ### Contribute
175
- 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.
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 your review is not requested on.
176
177
 
177
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).
178
179
 
@@ -183,7 +184,7 @@ You can simultaneously get the URI for a PR to review and checkout the branch ne
183
184
  Many operating systems have an `open` command (though the name "open" is not ubiquitous); this means you can run something like `open $(harmony contribute)` to open a web browser to the PR that Harmony is suggesting.
184
185
 
185
186
  #### Examples
186
- Retrieve a URI for the oldest unreviewed and open PR (prioritizing PRs for which you are an assigned reviewer):
187
+ Retrieve a URI for the oldest unreviewed and open PR (prioritizing PRs for which you are a requested reviewer):
187
188
  ```shell
188
189
  harmony contribute
189
190
  ```