Merge pull request #16812 from cho-m/formula_auditor-also-check-tag

formula_auditor: also use `tag` when checking GitHub license
This commit is contained in:
Mike McQuaid 2024-03-04 17:31:36 +00:00 committed by GitHub
commit cf7c093b30
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -242,6 +242,7 @@ module Homebrew
return if user.blank?
tag = SharedAudits.github_tag_from_url(formula.stable.url)
tag ||= formula.stable.specs[:tag]
github_license = GitHub.get_repo_license(user, repo, ref: tag)
return unless github_license
return if (licenses + ["NOASSERTION"]).include?(github_license)