-
-
Notifications
You must be signed in to change notification settings - Fork 10k
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
[WIP] bump: bump synced formula together #19213
base: master
Are you sure you want to change the base?
Conversation
d589d3a
to
2a31737
Compare
2a31737
to
140f11b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @bevanjkay, I think the overall logic looks good here – it's just that the diff is a bit scary because everything's been moved into a loop over the list of formulae to bump together (and pr_info
contains multiple commits, and only after all these commits are created should the audit checks be run).
Once you get the time to add tests I'd be happy to review this in more detail and even test it out.
comma_array "--synced-with=", | ||
description: "Also bump formula synced with <formula> in the same PR." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should just have a flag like --bump-synced
, which bumps synced formulae based on the list/JSON file in homebrew-core, rather than having to pass the list of synced formulae here.
@@ -498,7 +498,7 @@ def retrieve_and_display_info_and_open_pr(formula_or_cask, name, repositories, a | |||
return | |||
end | |||
|
|||
return if duplicate_pull_requests.present? | |||
# return if duplicate_pull_requests.present? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# return if duplicate_pull_requests.present? | |
return if duplicate_pull_requests.present? |
I think we discussed this at the end of the AGM, but this is just a reminder 😆.
|
||
pr_message = args.message | ||
|
||
# run_audit(formula, alias_rename, old_contents) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# run_audit(formula, alias_rename, old_contents) | |
run_audit(formula, alias_rename, old_contents) |
Again, just a reminder – and for context to others looking at this PR, these lines have been commented out just to make testing easy.
shallow = !git_dir.empty? && File.exist?("#{git_dir}/shallow") | ||
changed_files = [sourcefile_path] | ||
changed_files += additional_files if additional_files.present? | ||
# safe_system "git", "fetch", "--unshallow", "origin" if shallow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potentially another reminder to uncomment.
I think that ideally I will extract the loop logic into a separate function to make it a bit clearer. I have ran some singular bumps with this branch checked out, and there is currently an issue where the PR title is incorrect. Looking to get back to this PR in the next week or two. |
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?TODO:
brew bump-cask-pr