Skip to content

bundle: extend cleanup coverage#22395

Open
MikeMcQuaid wants to merge 1 commit into
mainfrom
bundle-cleanup-extensions
Open

bundle: extend cleanup coverage#22395
MikeMcQuaid wants to merge 1 commit into
mainfrom
bundle-cleanup-extensions

Conversation

@MikeMcQuaid
Copy link
Copy Markdown
Member

  • let cleanup --all opt in to all supported types
  • support cleanup for mas and krew
  • show readable cleanup item names for extensions

  • 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? Performance claims (e.g. "this is faster") must include Hyperfine benchmarks.
  • Have you written new tests (excluding integration tests) for your changes? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) with your changes locally?

  • AI was used to generate or assist with generating this PR.

OpenAI Codex 5.5 xhigh with local review and testing.


- let `cleanup --all` opt in to all supported types
- support cleanup for `mas` and `krew`
- show readable cleanup item names for extensions
Copilot AI review requested due to automatic review settings May 23, 2026 17:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends brew bundle cleanup to support a broader set of dependency types and improves the readability of cleanup output for extension-based package types. It also adds/updates tests to cover the new behavior and option surface.

Changes:

  • Add brew bundle cleanup --all to opt into cleaning all supported dependency types (formulae, casks, taps, and supported extensions).
  • Add cleanup support for the mas (Mac App Store) and krew extensions.
  • Improve dry-run output to display human-friendly item names for extension cleanup entries.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Library/Homebrew/bundle/subcommand/cleanup.rb Adds --all handling and prints readable extension cleanup item names in dry-run output.
Library/Homebrew/bundle/extensions/extension.rb Introduces a default cleanup_item_name hook for extensions to customize display names.
Library/Homebrew/bundle/extensions/mac_app_store.rb Implements cleanup_heading, cleanup item encoding/decoding, item naming, and uninstall logic for mas.
Library/Homebrew/bundle/extensions/krew.rb Enables cleanup support for krew via cleanup_heading and an uninstall implementation.
Library/Homebrew/test/cmd/bundle/cleanup_subcommand_spec.rb Adds a unit test ensuring cleanup --all selects all supported cleanup types.
Library/Homebrew/test/cmd/bundle_spec.rb Verifies cleanup --all option help text.
Library/Homebrew/test/bundle/mac_app_store_spec.rb Adds tests for mas cleanup item selection, naming, and uninstall behavior.
Library/Homebrew/test/bundle/krew_spec.rb Adds tests for krew cleanup item selection and uninstall behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MikeMcQuaid MikeMcQuaid enabled auto-merge May 24, 2026 11:30
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