Skip to content
Snippets Groups Projects
Unverified Commit 7ad7834b authored by Issy Long's avatar Issy Long
Browse files

audit: Supress pre-release audits for known pre-release formulae

- This safelists one formula that has only ever shipped pre-releases,
  from before we had the GitHub pre-release audit. So it won't fail CI
  and cause maintainers more work to determine if it's always been that
  way, or if it's new. Then, we don't have to keep comments at the top
  of files to say so for the next contributors.
- We should check this list from time to time to make sure that the
  formulae here have graduated to actual releases and we can remove
  them.
parent ddf20bdc
No related branches found
No related tags found
No related merge requests found
......@@ -597,6 +597,8 @@ module Homebrew
"libepoxy" => "1.5",
}.freeze
GITHUB_PRERELEASE_ALLOWLIST = %w[cake].freeze
# version_prefix = stable_version_string.sub(/\d+$/, "")
# version_prefix = stable_version_string.split(".")[0..1].join(".")
......@@ -705,8 +707,11 @@ module Homebrew
begin
if @online && (release = GitHub.open_api("#{GitHub::API_URL}/repos/#{owner}/#{repo}/releases/tags/#{tag}"))
problem "#{tag} is a GitHub prerelease" if release["prerelease"]
problem "#{tag} is a GitHub draft" if release["draft"]
if release["prerelease"] && !GITHUB_PRERELEASE_ALLOWLIST.include?(formula.name)
problem "#{tag} is a GitHub prerelease"
elsif release["draft"]
problem "#{tag} is a GitHub draft"
end
end
rescue GitHub::HTTPNotFoundError
# No-op if we can't find the release.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment