bump: compare newer_than_upstream values to true
When `Enumerable#all?` is called without an argument, it should check whether values are truthy but it doesn't appear to work as expected for the `newer_than_upstream` hash. In this case, `{ general: false }.all?` returns `true` when it seemingly should return `false`. This is preventing autobump from opening PRs for new versions, so I've updated related `all?` calls to use a block with an explicit comparison to `true` as a workaround to fix autobump in the immediate term.
This commit is contained in:
parent
f68908d492
commit
2f827242aa
@ -407,7 +407,7 @@ module Homebrew
|
||||
(new_version.general != "unable to get versions") &&
|
||||
(new_version.general != "skipped") &&
|
||||
(new_version != current_version) &&
|
||||
!newer_than_upstream.all?
|
||||
!newer_than_upstream.all? { |_k, v| v == true }
|
||||
# We use the ARM version for the pull request version. This is
|
||||
# consistent with the behavior of bump-cask-pr.
|
||||
pull_request_version = if multiple_versions
|
||||
@ -458,7 +458,7 @@ module Homebrew
|
||||
repology_latest = version_info.repology_latest
|
||||
|
||||
versions_equal = (new_version == current_version)
|
||||
all_newer_than_upstream = version_info.newer_than_upstream.all?
|
||||
all_newer_than_upstream = version_info.newer_than_upstream.all? { |_k, v| v == true }
|
||||
|
||||
title_name = ambiguous_cask ? "#{name} (cask)" : name
|
||||
title = if (repology_latest == current_version.general || !repology_latest.is_a?(Version)) && versions_equal
|
||||
|
Loading…
x
Reference in New Issue
Block a user