Keep patches in stable blocks during bumps #24307

Merged
MikeMcQuaid opened 4:48pm on October 20, 2026 wanted to merge 13 Ξ” into homebrew/brew main from
autobump-stable-patch-removal

brew doctor output

N/A

Verification

  • [x] I ran brew update twice and am still able to reproduce my issue.
  • [x] I have supplied my brew doctor output above and it seems unrelated to my issue.
  • [x] This issue's title and/or description do not reference a single formula e.g. brew install wget. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.
  • [x] I did not use AI/LLM to create this issue, or I disclosed the tool and model used; I will answer maintainer questions myself without AI/LLM.

brew config output

N/A

What were you trying to do (and why)?

The autobump CI ran into a formula with patches in the stable block, removed them and then couldn't create the PR because it left a stable block with only a URL and shasum.

What happened (include all command output)?

https://github.com/Homebrew/homebrew-core/actions/runs/39371747837/job/118460942682#step:6:28631

What did you expect to happen?

I expected autobump to create a PR that failed the style check, or kept the patches. Since knowing about the update is more important then having the patches cleaned up.

Step-by-step reproduction instructions (running brew commands)

brew bump --open-pr swctl
Diff Delta:
13
About 108 Diff Delta/hour
Classified as:  Bug Fix

MikeMcQuaid's Description of Work #24306 Autobump patch removal from stable block leaves the formula in a broken style

Avoid leaving a redundant stable block that prevents the version bump PR from being created.

Fixes #24306



  • [x] Have you followed our Contributing guidelines?

  • [x] Have you checked for other open Pull Requests for the same change?

  • [x] Have you explained what your changes do? Performance claims (e.g. "this is faster") must include brew benchmark results.

  • [x] Have you explained why you'd like these changes included, not just what they do?

  • [x] For bug fixes, have you given step-by-step brew commands to reproduce the bug?

  • [x] Have you written new tests (excluding integration tests)? Here's an example.

  • [x] Have you successfully run brew lgtm (style, typechecking and tests) locally?



  • [x] I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

Codex with GPT 6 Astra at Extra High effort, with local review and testing.


2 total changed files
Loading changes...
End of PR:
No more diffs beyond this point