formula_auditor: allow references to closed PRs
The `github_issue_comment` audit disallows references to closed or merged PRs in other repositories. We should allow those, since it is a common pattern to reference merged PRs in formulae when adding comments that explain changes that need to be made in future versions (e.g. `patch` blocks).
This commit is contained in:
parent
eb7c6ad195
commit
ca35e0ff11
@ -829,7 +829,9 @@ module Homebrew
|
||||
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["pull_request"].present?
|
||||
next if issue["state"] == "open"
|
||||
|
||||
issue_url = "https://github.com/#{owner}/#{repo}/#{type}/#{id}"
|
||||
problem "Formula refers to a GitHub issue or pull request that is closed: #{issue_url}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user