Refactor GitHub.create_bump_pr#22014
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the bump PR creation flow by extracting it from GitHub.create_bump_pr into a dedicated internal Homebrew::Bump module using typed Sorbet structs, and updates bump commands to call the new API.
Changes:
- Remove
GitHub.create_bump_pr(and related helpers) fromutils/github.rb. - Add
Library/Homebrew/bump.rbimplementingHomebrew::Bump.create_prwith typedBumpInfo/Commitstructs. - Update
bump-formula-prandbump-cask-prto construct typed inputs and callHomebrew::Bump.create_pr.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| Library/Homebrew/utils/github.rb | Removes the old bump PR helper implementation from the GitHub utility module. |
| Library/Homebrew/dev-cmd/bump-formula-pr.rb | Switches to Homebrew::Bump for PR creation and centralizes PR message construction. |
| Library/Homebrew/dev-cmd/bump-cask-pr.rb | Switches to Homebrew::Bump for PR creation and adjusts remote repo handling / invariants. |
| Library/Homebrew/bump.rb | Introduces the new typed internal implementation for creating bump PRs (fork/commit/push/open PR). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
154dc68 to
50300e8
Compare
dduugg
reviewed
Apr 14, 2026
Member
dduugg
left a comment
There was a problem hiding this comment.
Nice extraction work! Just a couple light comments/questions.
50300e8 to
4765741
Compare
MikeMcQuaid
reviewed
Apr 14, 2026
Member
|
I wonder if it caused |
botantony
added a commit
that referenced
this pull request
Apr 14, 2026
Now this code fails with `uninitialized constant` error, see #22014 (comment) Signed-off-by: botantony <antonsm21@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
T.untypedhash with typed structsargs- instead take a few boolean kwargs that we needutils/githubas:requires we need without having to bloatutils/githubNote:
brew-pip-auditneeds to be updated to use the new internal API - https://github.com/Homebrew/brew-pip-audit/blob/e9516df15d36d5dec778d63fdc8fc875226613c6/generate-prs.rb#L234I've not yet runtime tested this at all.