Skip to content

Commit

Permalink
update prerelease check to allow standard release
Browse files Browse the repository at this point in the history
  • Loading branch information
daeho-ro committed Dec 25, 2024
1 parent e4809f4 commit ce25ac7
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions Library/Homebrew/utils/shared_audits.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,14 @@ def self.github_release(user, repo, tag, formula: nil, cask: nil)
release = github_release_data(user, repo, tag)
return unless release

exception, name, version = if formula
[formula.tap&.audit_exception(:github_prerelease_allowlist, formula.name), formula.name, formula.version]
exception, version = if formula

Check warning on line 59 in Library/Homebrew/utils/shared_audits.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/utils/shared_audits.rb#L59

Added line #L59 was not covered by tests
[formula.tap&.audit_exception(:github_prerelease_allowlist, formula.name), formula.version]
elsif cask
[cask.tap&.audit_exception(:github_prerelease_allowlist, cask.token), cask.token, cask.version]
[cask.tap&.audit_exception(:github_prerelease_allowlist, cask.token), cask.version]
end

return "#{tag} is a GitHub pre-release." if release["prerelease"] && [version, "all"].exclude?(exception)

if !release["prerelease"] && exception
return "#{tag} is not a GitHub pre-release but '#{name}' is in the GitHub prerelease allowlist."
end

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

Expand Down

0 comments on commit ce25ac7

Please sign in to comment.