Merge pull request #16900 from Homebrew/github-fix
utils/github: fix variable scope
This commit is contained in:
commit
2d3183c84e
@ -606,7 +606,6 @@ module GitHub
|
|||||||
EOS
|
EOS
|
||||||
owner, repo = tap_remote_repo.split("/")
|
owner, repo = tap_remote_repo.split("/")
|
||||||
variables = { owner:, repo:, states: ["OPEN"] }
|
variables = { owner:, repo:, states: ["OPEN"] }
|
||||||
regex = pull_request_title_regex(name, version)
|
|
||||||
|
|
||||||
pull_requests = []
|
pull_requests = []
|
||||||
API.paginate_graphql(query, variables:) do |result|
|
API.paginate_graphql(query, variables:) do |result|
|
||||||
@ -617,6 +616,7 @@ module GitHub
|
|||||||
pull_requests
|
pull_requests
|
||||||
end
|
end
|
||||||
|
|
||||||
|
regex = pull_request_title_regex(name, version)
|
||||||
@open_pull_requests[cache_key].select { |pr| regex.match?(pr["title"]) }
|
@open_pull_requests[cache_key].select { |pr| regex.match?(pr["title"]) }
|
||||||
.map { |pr| pr.merge("html_url" => pr.delete("url")) }
|
.map { |pr| pr.merge("html_url" => pr.delete("url")) }
|
||||||
rescue API::RateLimitExceededError => e
|
rescue API::RateLimitExceededError => e
|
||||||
|
Loading…
x
Reference in New Issue
Block a user