Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev-cmd/bump: skip autobump formulae & casks #16833

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

cho-m
Copy link
Member

@cho-m cho-m commented Mar 6, 2024

  • 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?

Not sure how useful, but can allow bypassing autobumped formulae/casks in scenarios like running without args or when running with --installed, e.g.

brew bump --formulae --installed
==> abseil
Formula is on autobump list.

==> aom
Formula is on autobump list.

==> aribb24 is up to date!
Current formula version:  1.0.4
Latest livecheck version: 1.0.4
Latest Repology version:  1.0.4
Open pull requests:       none
Closed pull requests:     aribb24: update 1.0.4 bottle. (https://github.com/Homebrew/homebrew-core/pull/142654), aribb24 1.0.4 (new formula) (https://github.com/Homebrew/homebrew-core/pull/115592)

...

Sorry, something went wrong.

@Bo98
Copy link
Member

Bo98 commented Mar 6, 2024

This is a good idea, though it should probably be the default behaviour without any switch involved, no?

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.

Agree with @Bo98: makes sense but should be default behaviour with no documented opt-out flag (but the undocumented environment variable for our internal usage).

Verified

This commit was signed with the committer’s verified signature.
cho-m Michael Cho
Instead output a message that corresponding formula/cask is on the
autobump list. This avoids deferring the information to the error
message within `bump-{formula,cask}-pr`.

Signed-off-by: Michael Cho <michael@michaelcho.dev>
@cho-m cho-m force-pushed the bump-skip-autobump branch from 027df89 to 12d1e56 Compare March 6, 2024 17:48
@cho-m cho-m changed the title dev-cmd/bump: add --skip-autobump dev-cmd/bump: skip autobump formulae & casks Mar 6, 2024
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 great, thanks again @cho-m!

@MikeMcQuaid MikeMcQuaid merged commit 607d3b2 into Homebrew:master Mar 7, 2024
24 checks passed
@cho-m cho-m deleted the bump-skip-autobump branch March 7, 2024 13:05
# Whether this {Tap} allows running bump commands on the given {Formula} or {Cask}.
sig { params(formula_or_cask_name: String).returns(T::Boolean) }
def allow_bump?(formula_or_cask_name)
ENV["HOMEBREW_TEST_BOT_AUTOBUMP"].present? || !official? || autobump.exclude?(formula_or_cask_name)
Copy link
Member

Choose a reason for hiding this comment

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

We could maybe just read GITHUB_ACTOR or similar here to avoid having to carry around an extra environment variable in our workflows.

@github-actions github-actions bot added the outdated PR was locked due to age label Apr 8, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants