dev-cmd/bump-formula-pr: deprecate throttled_formulae.json

Signed-off-by: Michael Cho <michael@michaelcho.dev>
This commit is contained in:
Michael Cho 2024-04-01 00:54:36 -04:00
parent 2d50ef1bc0
commit 4b65052b22
No known key found for this signature in database
GPG Key ID: 55E85E28A7CD1E85

View File

@ -474,7 +474,10 @@ module Homebrew
def check_throttle(formula, new_version)
throttled_rate = formula.livecheck.throttle
throttled_rate ||= formula.tap.audit_exceptions.dig(:throttled_formulae, formula.name)
throttled_rate ||= if (rate = formula.tap.audit_exceptions.dig(:throttled_formulae, formula.name))
odeprecated "throttled_formulae.json", "Livecheck#throttle"
rate
end
return if throttled_rate.blank?
formula_suffix = Version.new(new_version).patch.to_i