KEMBAR78
bump-*-pr: skip PR creation when --write-only without --commit by gibfahn · Pull Request #20840 · Homebrew/brew · GitHub
Skip to content

Conversation

gibfahn
Copy link
Contributor

@gibfahn gibfahn commented Oct 9, 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?

PR #20005 fixed --write-only and broke --write-only --commit (my bad). #20809 fixed --write-only --commit and broke --write-only. This
hopefully fixes both.

From the help:

--write-only                 Make the expected file modifications without
                             taking any Git actions.
--commit                     When passed with --write-only, generate a
                             new commit after writing changes to the cask
                             file.

So if --write-only is passed without --commit, we should skip the
whole PR creation flow. But if --write-only --commit is passed, we
should generate the branch and commit but not the PR.

Refs: #20005
Refs: #20809
Refs: https://github.com/Homebrew/brew/pull/20818/files

Homebrew#20005 fixed `--write-only` and broke `--write-only --commit` (my bad).
Homebrew#20809 fixed `--write-only --commit` and broke `--write-only`. This
hopefully fixes both.

From the help:

```
--write-only                 Make the expected file modifications without
                             taking any Git actions.
--commit                     When passed with --write-only, generate a
                             new commit after writing changes to the cask
                             file.
```

So if `--write-only` is passed without `--commit`, we should skip the
whole PR creation flow. But if `--write-only --commit` is passed, we
should generate the branch and commit but not the PR.

Refs: Homebrew#20005
Refs: Homebrew#20809
Refs: https://github.com/Homebrew/brew/pull/20818/files
@gibfahn
Copy link
Contributor Author

gibfahn commented Oct 9, 2025

cc/ @scientificworld as you filed the previous PR, let me know if this doesn't make sense.

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.

Seems fine, thanks!

@MikeMcQuaid
Copy link
Member

  • Have you successfully run brew style with your changes locally?

You didn't 😉. I'll fix.

@MikeMcQuaid MikeMcQuaid enabled auto-merge October 9, 2025 10:24
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Oct 9, 2025
Merged via the queue into Homebrew:main with commit 250010a Oct 9, 2025
38 checks passed
@gibfahn
Copy link
Contributor Author

gibfahn commented Oct 9, 2025

Have you successfully run brew style with your changes locally?

My bad, I must have changed it again after running the checks 😞

@gibfahn gibfahn deleted the write_only_no_commit branch October 9, 2025 11:54
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