Don't let users open more than 15 PRs at a time. We have other tooling
to nudge them to not do this but let's put it in the worst offenders:
the `bump*` commands.
For now, restrict to partial version excluding the last part, i.e.
version with major.minor.patch will result in attempting to replace any
occurrences of "/#{major}.#{minor}/" or "/v#{major}.#{minor}/".
This should take care of common situations like GNOME, KDE, and
SourceForge URLs. It should also help with URLs like `util-linux`.
It may result in incorrect replacements if URL has partial version based
on another versioning scheme like the API version or if there are some
equivalent numbers in URL that happen to match
Signed-off-by: Michael Cho <michael@michaelcho.dev>
Instead output a message that corresponding formula/cask is on the
autobump list. This avoids deferring the information to the error
message within `bump-{formula,cask}-pr`.
Signed-off-by: Michael Cho <michael@michaelcho.dev>
If there are duplicate PRs: we shouldn't suggest and allow a trivial
override. Instead, they should be created manually.
An undocumented override exists for BrewTestBot to do autobumps.
Contributors and maintainers usually strike through the message after
checking `resource` blocks for updates. Let's add a checkbox to make it
easier to update the status.
Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
- I was wondering why `brew bump` PRs have descriptions with both commands, like:
```
Created with `brew bump`.
---
Created by `brew bump-formula-pr`.
```
- Then I read the code and realised that "append" was the wrong word for the
`--message` arg description.
We added the `--all` flag (now renamed to `--eval-all`) for various
commands for this behaviour so let's start deprecating this.
Also, introduce a `HOMEBREW_EVAL_ALL` environment variable to use the
existing, less secure, behaviour by default and avoid passing
`--eval-all` everywhere.
The existing `bump-formula-pr` regexes expect a `url` string to only
be followed by a newline. However, `url` also accepts a `specs` hash,
which can appear after the `url` string. For example:
```
url "https://www.example.com/1.2.3.tar.gz", using: :homebrew_curl
```
This commit modifies the regexes to capture anything after the `url`
string and before the newline. This works for the aforementioned
example, where the trailing hash is on the same line, but it won't
work if the hash appears on a subsequent line. For example:
```
url "https://www.example.com/1.2.3.tar.gz",
using: :homebrew_curl
```