From a9e31274fc907caebe5791fa4ec453c819c07672 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Wed, 15 Mar 2023 21:31:41 +0000 Subject: [PATCH] dev-cmd/contributions: Output why we default to 0 reviews on a validation error --- Library/Homebrew/dev-cmd/contributions.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Library/Homebrew/dev-cmd/contributions.rb b/Library/Homebrew/dev-cmd/contributions.rb index 9ffb3a8393..ebad7138c9 100755 --- a/Library/Homebrew/dev-cmd/contributions.rb +++ b/Library/Homebrew/dev-cmd/contributions.rb @@ -209,6 +209,9 @@ module Homebrew def count_reviews(repo_full_name, person, args) GitHub.count_issues("", is: "pr", repo: repo_full_name, reviewed_by: person, review: "approved", args: args) rescue GitHub::API::ValidationFailedError + if args.verbose? + onoe "Couldn't search GitHub for PRs by #{person}. Their profile might be private. Defaulting to 0." + end 0 # Users who have made their contributions private are not searchable to determine counts. end end