Skip to content

Commit

Permalink
Merge pull request Homebrew#16900 from Homebrew/github-fix
Browse files Browse the repository at this point in the history
utils/github: fix variable scope
  • Loading branch information
Bo98 authored Mar 16, 2024
2 parents 8102e23 + e6f6476 commit 2d3183c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Library/Homebrew/utils/github.rb
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,6 @@ def self.fetch_open_pull_requests(name, tap_remote_repo, version: nil)
EOS
owner, repo = tap_remote_repo.split("/")
variables = { owner:, repo:, states: ["OPEN"] }
regex = pull_request_title_regex(name, version)

pull_requests = []
API.paginate_graphql(query, variables:) do |result|
Expand All @@ -617,6 +616,7 @@ def self.fetch_open_pull_requests(name, tap_remote_repo, version: nil)
pull_requests
end

regex = pull_request_title_regex(name, version)
@open_pull_requests[cache_key].select { |pr| regex.match?(pr["title"]) }
.map { |pr| pr.merge("html_url" => pr.delete("url")) }
rescue API::RateLimitExceededError => e
Expand Down

0 comments on commit 2d3183c

Please sign in to comment.