Skip to content

Commit

Permalink
Merge pull request #14580 from carlocab/closed-prs
Browse files Browse the repository at this point in the history
formula_auditor: allow references to merged PRs
  • Loading branch information
MikeMcQuaid authored Feb 15, 2023
2 parents 08c6b45 + 72d8a50 commit d87c7d7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Library/Homebrew/formula_auditor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,9 @@ def audit_github_issue_comment
next if "#{owner}/#{repo}" == formula.tap.remote_repo || owner == "Homebrew"

issue = GitHub::API.open_rest("https://api.github.com/repos/#{owner}/#{repo}/issues/#{id}")
next if issue.blank? || issue["state"] == "open"
next if issue.blank?
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}"
Expand Down

0 comments on commit d87c7d7

Please sign in to comment.