From 72d8a50e7a8d7af64b6143475f6e73980a796547 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Wed, 15 Feb 2023 16:18:48 +0800 Subject: [PATCH] Disallow references to PRs that are closed but not merged --- Library/Homebrew/formula_auditor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/formula_auditor.rb b/Library/Homebrew/formula_auditor.rb index 67e0cc6b35..40530ef8e1 100644 --- a/Library/Homebrew/formula_auditor.rb +++ b/Library/Homebrew/formula_auditor.rb @@ -830,8 +830,8 @@ module Homebrew issue = GitHub::API.open_rest("https://api.github.com/repos/#{owner}/#{repo}/issues/#{id}") next if issue.blank? - next if issue["pull_request"].present? next if issue["state"] == "open" + next if issue.dig("pull_request", "merged_at").present? issue_url = "https://github.com/#{owner}/#{repo}/#{type}/#{id}" problem "Formula refers to a GitHub issue or pull request that is closed: #{issue_url}"