Disallow references to PRs that are closed but not merged
This commit is contained in:
parent
ca35e0ff11
commit
72d8a50e7a
@ -830,8 +830,8 @@ module Homebrew
|
|||||||
|
|
||||||
issue = GitHub::API.open_rest("https://api.github.com/repos/#{owner}/#{repo}/issues/#{id}")
|
issue = GitHub::API.open_rest("https://api.github.com/repos/#{owner}/#{repo}/issues/#{id}")
|
||||||
next if issue.blank?
|
next if issue.blank?
|
||||||
next if issue["pull_request"].present?
|
|
||||||
next if issue["state"] == "open"
|
next if issue["state"] == "open"
|
||||||
|
next if issue.dig("pull_request", "merged_at").present?
|
||||||
|
|
||||||
issue_url = "https://github.com/#{owner}/#{repo}/#{type}/#{id}"
|
issue_url = "https://github.com/#{owner}/#{repo}/#{type}/#{id}"
|
||||||
problem "Formula refers to a GitHub issue or pull request that is closed: #{issue_url}"
|
problem "Formula refers to a GitHub issue or pull request that is closed: #{issue_url}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user