- This doesn't require "all" to be specified as part of the command,
it's the default, so usage is now just:
```
$ brew contributions "Issy Long"
$ brew contributions "Issy Long" --repositories=brew,core
$ brew contributions me@issyl0.co.uk --repositories=cask,bundle
```
- As we discussed in the PR review before, `comma_array` doesn't allow
two names, so we can't (yet) do `comma_array "--repositories",
"--repos"` like we can with `flag`. That's an enhancement for the future
if we want to make the flags here less verbose. But now that "all" is
the default, maybe less necessary.
- Also stop skipping a "versions" repo. Since
023261038192a4f55c95a4d2486873ec1c9a728a the
`Homebrew/homebrew-cask-versions` tap won't get mistaken for
`Homebrew/homebrew-versions` tap.
- This is easier than mapping GitHub usernames to email addresses, when
folks don't have email addresses always public on their GitHub
profiles. Also, the users of this command (PLC members, other
interested parties) don't have to remember folks' email addresses.
- It also gives better data for people who've changed their name over
the years, and who commit with multiple email addresses (personal and
work).
```
❯ brew contributions "Issy Long" all
Person Issy Long directly authored 687 commits and co-authored 33 commits across all Homebrew repos in all time.
❯ brew contributions "Rylan Polster" all
Person Rylan Polster directly authored 1747 commits and co-authored 133 commits across all Homebrew repos in all time.
❯ brew contributions me@issyl0.co.uk all
Person me@issyl0.co.uk directly authored 711 commits and co-authored 25 commits across all Homebrew repos in all time.
❯ brew contributions "Mike McQuaid" all
Person Mike McQuaid directly authored 26879 commits and co-authored 204 commits across all Homebrew repos in all time.
```
- This is apparently "more in-keeping with how we do required arguments
(never requiring flags)" across Homebrew.
- New usage: `brew contributions me@issyl0.co.uk all`, `brew
contributions me@issyl0.co.uk brew,core`
- I got these with hash syntax because I couldn't figure out Sorbet, but
there's `args.rbi` to add the CLI args methods to. Nice!
- In doing this I realised that `--repositories` is required again, we
no longer infer `--repositories=all` from no `--repositories` passed
as we did in a previous version of this.
- This way we can do the more intuitive:
```
$ brew contributions --repos=brew,core rslpolster@gmail.com
Person rslpolster@gmail.com directly authored 1580 commits and co-authored 125 commits to brew, core in all time.
```
- Before each AGM it's currently a manual process for a PLC member to
search commit logs and GitHub to figure out who contributed to
Homebrew, so who should remain a member.
- I noticed that [looking at commits for a
user](https://github.com/Homebrew/homebrew-core/commits?author=issyl0&since=2022-01-01&until=2023-01-01)
would not count `Co-Authored-By`, which happens a lot now there's an
autosquash action on PRs in `Homebrew/homebrew-core`, say if someone
fixed a formula's build or tests or whatever and then the PR got
auto-merged.
- Here's `brew contributions` that uses `git log` to be able to go back
through all time or a specific time period (`--from`, `--to`). It's up
to individual PLC discretion for "activity", but it does at least go
some way to automating the data retrieval.
- Example (I can use my username as `--email` because my username is in
all of the email addresses that I use for committing to Homebrew):
```
$ brew contributions --email=issyl0 --repos=brew,core
Person issyl0 directly authored 732 commits and co-authored 31 commits to brew, core in all time.
```