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

pr-pull: allow casks to be pulled #12692

Merged
merged 4 commits into from Apr 4, 2022

Conversation

SMillerDev
Copy link
Member

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

@BrewTestBot
Copy link
Member

Review period will end on 2022-01-11 at 16:59:20 UTC.

@BrewTestBot BrewTestBot added the waiting for feedback Merging is blocked until sufficient time has passed for review label Jan 10, 2022
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 good so far!

Library/Homebrew/test/dev-cmd/pr-pull_spec.rb Outdated Show resolved Hide resolved
@BrewTestBot BrewTestBot removed the waiting for feedback Merging is blocked until sufficient time has passed for review label Jan 11, 2022
@BrewTestBot
Copy link
Member

Review period ended.

Copy link
Member

@Rylan12 Rylan12 left a comment

Choose a reason for hiding this comment

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

What does pr-pull do for casks? I thought the things it did were pretty formula-specific (download bottles, apply bottle commit, upload bottles). Is it just autosquash?

Library/Homebrew/dev-cmd/pr-pull.rb Outdated Show resolved Hide resolved
@SMillerDev
Copy link
Member Author

Just autosquash yeah. But allowing one tool for all parts of homebrew seems practical for automation.

@Rylan12
Copy link
Member

Rylan12 commented Jan 17, 2022

Just autosquash yeah. But allowing one tool for all parts of homebrew seems practical for automation.

Agreed. I wonder, though, if it makes more sense to have a brew pr-autosquash command that does that for both formulae and casks, and then have brew pr-pull be formulae-only and just call pr-autosquash like it already does pr-upload.

Or maybe pull out the bottle stuff from brew pr-pull and put that in brew pr-bottle or something like that.

It just feels weird to have such a huge part of this command be formula-specific but also throw in some cask stuff too. I feel like it would be easier to set up workflows and understand what's happening if they're separate.

@MikeMcQuaid
Copy link
Member

Agreed. I wonder, though, if it makes more sense to have a brew pr-autosquash command that does that for both formulae and casks, and then have brew pr-pull be formulae-only and just call pr-autosquash like it already does pr-upload.

Or maybe pull out the bottle stuff from brew pr-pull and put that in brew pr-bottle or something like that.

It just feels weird to have such a huge part of this command be formula-specific but also throw in some cask stuff too. I feel like it would be easier to set up workflows and understand what's happening if they're separate.

This makes sense to me 👍🏻

@SMillerDev
Copy link
Member Author

It makes sense to me too, but I don't have the time to split the commands right now. @Rylan12 would you be interested in picking that up?

@Rylan12
Copy link
Member

Rylan12 commented Jan 22, 2022

Sure, I can spend some time on it. What was your plan for using this with casks, though? Were you thinking we would switch homebrew/cask to the approve-and-automatically-merge workflow that we use in homebrew/core?

@SMillerDev
Copy link
Member Author

Yeah, that's my dream. Pressing a second button to merge is an annoying deviation from my preferred workflow 😅

@Rylan12
Copy link
Member

Rylan12 commented Jan 28, 2022

Sorry for the delay here. Even though I said I could work on it, I forgot that my classes were starting this week so I haven't had any time to work on this. I should next week, though.

If you want to merge this, though, I'd be okay with that and can always come back to separating the commands when I have more time.

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Feb 19, 2022
@SMillerDev
Copy link
Member Author

Okay, I decided to fix this up after all. @Rylan12 and @MikeMcQuaid are you okay merging this despite a new command possibly being cleaner?

@github-actions github-actions bot removed the stale No recent activity label Feb 19, 2022
@MikeMcQuaid
Copy link
Member

Okay, I decided to fix this up after all. @Rylan12 and @MikeMcQuaid are you okay merging this despite a new command possibly being cleaner?

@SMillerDev I'm weakly opposed, personally. I'd be more in favour if I felt it didn't make the code a bit harder to follow. Sorry! ❤️

@SMillerDev
Copy link
Member Author

I understand that, I personally think the benefit of a unified automerge for both taps outweigh the added complexity but unless someone else wants to pitch in in either argument or effort I'll leave this one to stalebot to get rid of.

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.

Changed my mind, fine on this being merged once all comments are addressed.

Library/Homebrew/dev-cmd/pr-pull.rb Outdated Show resolved Hide resolved
Library/Homebrew/dev-cmd/pr-pull.rb Outdated Show resolved Hide resolved
Library/Homebrew/dev-cmd/pr-pull.rb Outdated Show resolved Hide resolved
Library/Homebrew/dev-cmd/pr-pull.rb Outdated Show resolved Hide resolved
Library/Homebrew/dev-cmd/pr-pull.rb Outdated Show resolved Hide resolved
Library/Homebrew/dev-cmd/pr-pull.rb Outdated Show resolved Hide resolved
Library/Homebrew/dev-cmd/pr-pull.rb Outdated Show resolved Hide resolved
Library/Homebrew/dev-cmd/pr-pull.rb Show resolved Hide resolved
Library/Homebrew/dev-cmd/pr-pull.rb Outdated Show resolved Hide resolved
Library/Homebrew/dev-cmd/pr-pull.rb Outdated Show resolved Hide resolved
Copy link
Member

@Rylan12 Rylan12 left a comment

Choose a reason for hiding this comment

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

So sorry for the delay here, and I apologize for not actually having the time to work on this.

I'm also fine with this being merged once the existing comments are addressed. After thinking a little more, I don't think it's super un-intuitive to have it work like this anyway. pr-pull should pull the PR down and prepare whatever needs to happen, and as is this PR just makes it intelligent enough to do different things based on the type of PR.

@SMillerDev
Copy link
Member Author

Cask '.rb' is unavailable: No Cask with this name exists.

I'm not sure why the caskloader keeps failing now. Anyone have some ideas?

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Mar 27, 2022
@SMillerDev SMillerDev force-pushed the feature/pr-pull/casks branch 2 times, most recently from fc45cbf to ad7bc36 Compare March 27, 2022 12:48
@SMillerDev SMillerDev removed the stale No recent activity label Mar 28, 2022
Copy link
Member

@nandahkrishna nandahkrishna left a comment

Choose a reason for hiding this comment

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

Some style suggestions as well apart from the get_package fix.

Library/Homebrew/test/dev-cmd/pr-pull_spec.rb Outdated Show resolved Hide resolved
Library/Homebrew/test/dev-cmd/pr-pull_spec.rb Outdated Show resolved Hide resolved
Library/Homebrew/test/dev-cmd/pr-pull_spec.rb Outdated Show resolved Hide resolved
Library/Homebrew/test/dev-cmd/pr-pull_spec.rb Outdated Show resolved Hide resolved
Library/Homebrew/test/dev-cmd/pr-pull_spec.rb Outdated Show resolved Hide resolved
Library/Homebrew/test/dev-cmd/pr-pull_spec.rb Outdated Show resolved Hide resolved
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.

A few style suggestions but: looks good to me to ship whenever! Nice work @SMillerDev!

Library/Homebrew/dev-cmd/pr-pull.rb Outdated Show resolved Hide resolved
Library/Homebrew/dev-cmd/pr-pull.rb Outdated Show resolved Hide resolved
Library/Homebrew/dev-cmd/pr-pull.rb Outdated Show resolved Hide resolved
Library/Homebrew/dev-cmd/pr-pull.rb Outdated Show resolved Hide resolved
Library/Homebrew/dev-cmd/pr-pull.rb Outdated Show resolved Hide resolved
Library/Homebrew/dev-cmd/pr-pull.rb Outdated Show resolved Hide resolved
Library/Homebrew/dev-cmd/pr-pull.rb Outdated Show resolved Hide resolved
SMillerDev and others added 3 commits April 4, 2022 13:24
@SMillerDev SMillerDev merged commit d62558a into Homebrew:master Apr 4, 2022
@SMillerDev SMillerDev deleted the feature/pr-pull/casks branch April 4, 2022 14:02
@github-actions github-actions bot added the outdated PR was locked due to age label May 5, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2022
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

6 participants