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
Repo knowledgeable bump formula pr #6538
Repo knowledgeable bump formula pr #6538
Conversation
Thanks for starting on this PR, @morganrconnolly. I’ll take a look at it this weekend! |
Thanks for starting on this! I found your comment on the original issue and I'll answer it here. I think it's a good idea to get the commands running locally for you so you can test your changes, as I've noticed some syntax issues.
There are docs on where to run commands from and how to set up your fork. You can then checkout your existing forked branch and run the code you're editing ( Do you run Homebrew on macOS or Linux? If macOS, you'll probably want to test the functionality in our Linux-based Docker container via If you get stuck, or need more advice, do comment here and we can work through it. I'm happy to help! 😄 |
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 for the PR! Have you been able to test this locally? If not, do you need some help figuring out how to do that?
@@ -297,7 +297,19 @@ def bump_formula_pr | |||
ohai "git checkout --quiet -" | |||
ohai "create pull request with GitHub API" | |||
else | |||
|
|||
#determine if this formula has tap linuxbrew-core |
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.
Can skip (all) your comments as they describe what the code is doing rather than why and generally we favour using variable naming to describe what the code is doing.
if formula.tap.full_name.includes? "linuxbrew-core" | ||
#try to identify formula in homebrew core | ||
begin | ||
linuxbrew_core_formula = Formulary.factory(formula.gsub('linuxbrew-core','homebrew-core')) |
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.
formula.full_name.gsub
linuxbrew_core_formula = Formulary.factory(formula.gsub('linuxbrew-core','homebrew-core')) | ||
#if there's ambiguity print an informative message | ||
rescue TapFormulaAmbiguityError | ||
odie "Unable to identify which homebrew-core formula corresponds to this linuxbrew formula. Please open PR against homebrew-core for corresponding formula" |
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.
When does this occur?
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.
Linux specific formulae I would say.
@@ -297,7 +297,19 @@ def bump_formula_pr | |||
ohai "git checkout --quiet -" | |||
ohai "create pull request with GitHub API" | |||
else | |||
|
|||
#determine if this formula has tap linuxbrew-core | |||
if formula.tap.full_name.includes? "linuxbrew-core" |
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.
if OS.linux? && formula.tap.core_tap?
After thinking about it, I would say we need to:
|
brew style
with your changes locally?brew tests
with your changes locally?