From 03d9a3dda5b4e5be5a42b4e229912c63cb2a3f74 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Sat, 24 Aug 2024 23:10:39 +0800 Subject: [PATCH] utils/github: use `#fetch` Co-authored-by: Markus Reiter --- Library/Homebrew/utils/github.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/utils/github.rb b/Library/Homebrew/utils/github.rb index 09cebc3744..2e964309ba 100644 --- a/Library/Homebrew/utils/github.rb +++ b/Library/Homebrew/utils/github.rb @@ -915,8 +915,8 @@ module GitHub homebrew_prs_count = 0 API.paginate_graphql(query) do |result| - data = result["viewer"] - github_user = data["login"] + data = result.fetch("viewer") + github_user = data.fetch("login") # BrewTestBot can open as many PRs as it wants. return false if github_user.casecmp("brewtestbot").zero?