bump-cask-pr: add basic throttle handling by samford · Pull Request #21548 · Homebrew/brew
AI review requested due to automatic review settings
February 8, 2026 21:52Support for the `throttle` DSL was initially added to `bump-formula-pr` but apparently never added to `bump-cask-pr`, which I only discovered after trying to throttle a cask. This adds basic support for handling a `throttle` value in `bump-cask-pr` using the same approach as `bump-formula-pr`. One thing to note is that this currently only supports simple casks with one top-level `version` and `livecheck` block. Other parts of bump have issues with arch- and OS-specific version bumps and I have some in-progress work to try to improve that, so I can't make any guarantees beyond simple casks. I will likely revisit how versions are handled in `check_throttle` as part of that work, so I borrowed the simple logic for selecting a version from the `BumpVersionParser` object for the time being (i.e., ARM -> general but also falling back to Intel here). The two casks that I know of that we're currently manually throttling using a `strategy` block aren't able to be supported by this initial implementation. `bettertouchtool@alpha` doesn't have a patch version and instead throttles based on the `version.csv.second` (build) value. `commander` doesn't create releases for every version number, so requiring a version to be divisible by the throttle number would cause the cask to skip many more versions than intended. I intend to handle these situations in follow-up PRs by adding options to the `throttle` DSL to dictate what version part to check and to disable the rounding behavior respectively but this is a start.
MikeMcQuaid
deleted the
bump-cask-pr-add-throttle-handling
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters