Skip to content

Commit

Permalink
utils/shared_audits.rb: fail if not a pre-release anymore but still i…
Browse files Browse the repository at this point in the history
…n the GITHUB_PRERELEASE_ALLOWLIST
  • Loading branch information
Moisan committed Dec 6, 2020
1 parent be7ba28 commit 8d505c4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Library/Homebrew/utils/shared_audits.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ def github_release(user, repo, tag, formula: nil, cask: nil)
return "#{tag} is a GitHub pre-release."
end

if !release["prerelease"] && ((formula && GITHUB_PRERELEASE_ALLOWLIST.key?(formula.name)) ||
(cask && GITHUB_PRERELEASE_ALLOWLIST[cask.token]))
return "#{tag} is not a GitHub pre-release but is expected to be."
end

return "#{tag} is a GitHub draft." if release["draft"]
end

Expand Down

0 comments on commit 8d505c4

Please sign in to comment.