This is really, really slow at the moment for a few reasons:
- it goes through the list of revisions twice
- it checks many more revisions than it needs to
Even after these improvements it's still by far the slowest audit so
am also making it a `--git` only audit.
Additionally, to further improve default `brew audit` performance do not
run `brew style` checks when doing `brew audit` with no arguments.
`brew style` can be run quickly and efficiently on all of a tap (and is
cached) so no need to duplicate it here.
Also remove default `--with-label` value and add `--without-approval`
option.
Reviews could be automatically dismissed on new commits pushed (there is
an option for that in repository settings on Github). That is not the
case for labels. They remain attached to a PR, even when new commits are
pushed. This is undesirable and creates security concerns, because
someone could introduce untested code just before the automerge happens.
Co-authored-by: Eric Knibbe <enk3@outlook.com>
This will allow `brew style` and `brew audit` to be run separately
without providing duplicates.
Additionally, run RuboCop style rules when `--strict` isn't provided and
remove a confusing reference to `style`.
- Muscle memory is a thing, as is relying heavily on one's shell
history. Now that the Jenkins runners are gone, `brew pull --bottle`
no longer works. This removes the option. If maintainers are confused,
they should [look at recent changes to the
docs](https://docs.brew.sh/Brew-Test-Bot-For-Core-Contributors#bottling),
or ask in Slack.
- An earlier iteration of this showed a deprecation warning and a link
to the docs, but when an option no longer physically works it's a bit
late for deprecation *warnings*.
- This also fixes a `brew style` warning from futher up in the file.
pull: Appease RuboCop
If `HOMEBREW_GITHUB_API_TOKEN` is not set and `GITHUB_TOKEN` is: let's
use it. `GITHUB_TOKEN` is a somewhat standard env var to set for
GitHub authentication tokens (e.g. used by `hub`).