KEMBAR78
formula_auditor: get casks from API if not tapped by cho-m · Pull Request #20816 · Homebrew/brew · GitHub
Skip to content

Conversation

@cho-m
Copy link
Member

@cho-m cho-m commented Oct 4, 2025

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

CoreCaskTap.instance.cask_tokens handles 2 scenarios:

  • API
  • no API with Homebrew/cask tapped

Homebrew/core CI runs in a 3rd scenario, i.e. no API without Homebrew/cask tapped.


This PR does mean a network fetch may occur during brew audit even when no API is used. As a developer command and conditioned only for Homebrew/core formulae, I think this is okay.

Could put it under @online but that seems to be for slower audits and isn't needed in CI where we've already fetched the JSON API in an earlier step.

Could restrict to CI only if preferred.

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good if suggestion applied, thanks!

Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
@cho-m
Copy link
Member Author

cho-m commented Oct 6, 2025

May need to check if we have a chicken-and-egg issue for tap migrations.

I'm guessing cask-to-formula currently works due to lack of audit check, i.e. migration PR passes for non-existent formula

Likely want to have a bypass label specific for tap migrations that will use same name.

@MikeMcQuaid
Copy link
Member

Thanks!

@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Oct 6, 2025
Merged via the queue into main with commit f8e264c Oct 6, 2025
38 checks passed
@MikeMcQuaid MikeMcQuaid deleted the cask-conflict-audit branch October 6, 2025 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants