Skip to content

Commit

Permalink
formula_auditor: also use tag when checking GitHub license
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Cho <[email protected]>
  • Loading branch information
cho-m committed Mar 4, 2024
1 parent 8d4e841 commit 00a12b7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Library/Homebrew/formula_auditor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ def audit_license
return if user.blank?

tag = SharedAudits.github_tag_from_url(formula.stable.url)
tag ||= formula.stable.specs[:tag]

Check warning on line 245 in Library/Homebrew/formula_auditor.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/formula_auditor.rb#L245

Added line #L245 was not covered by tests
github_license = GitHub.get_repo_license(user, repo, ref: tag)
return unless github_license
return if (licenses + ["NOASSERTION"]).include?(github_license)
Expand Down

0 comments on commit 00a12b7

Please sign in to comment.