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

Add full_token and tap entries to cask json output #10540

Merged
merged 7 commits into from
Feb 8, 2021
Merged

Add full_token and tap entries to cask json output #10540

merged 7 commits into from
Feb 8, 2021

Conversation

cdalvaro
Copy link
Contributor

@cdalvaro cdalvaro commented Feb 5, 2021

  • 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?
  • Have you successfully run brew man locally and committed any changes?

This PR closes #10539

@Rylan12
Copy link
Member

Rylan12 commented Feb 6, 2021

Thanks, @cdalvaro! I think this makes sense. We already have full_name in the formula json output, so adding full_token here for casks too is a good idea.

I think it would make sense to add a tap entry in the json output as well (for both formulae and casks).

I'm thinking something like this:

{
  "formulae": [
    {
      "name": "foo",
      "full_name": "foo",
      "tap": "homebrew/core",
      ...
    }
  ],
  "casks": [
    {
      "token": "foo",
      "full_token": "homebrew/cask/foo",
      "tap": "homebrew/cask",
      ...
    }
  ]
}

Would you be willing to implement this?

@cdalvaro
Copy link
Contributor Author

cdalvaro commented Feb 6, 2021

Perfect! (It was part of my proposal in #10539)

I will block temporary the PR until I have added the tap entry for both formulae and casks.

@cdalvaro cdalvaro marked this pull request as draft February 6, 2021 18:44
@Rylan12
Copy link
Member

Rylan12 commented Feb 6, 2021

Awesome! Thanks, @cdalvaro!

Is there a reason this should still be a draft?

@cdalvaro
Copy link
Contributor Author

cdalvaro commented Feb 6, 2021

I was looking for the right way to add a test for the tap entry for formulae.

I think that tests test/cmd/list_spec.rb or test/cmd/info_spec.rb are the right place to add it, but this is my first contribution to the brew project and I'm not very used to ruby 😅

@cdalvaro cdalvaro marked this pull request as ready for review February 6, 2021 20:12
@broamiribnhawthorne62

This comment was marked as spam.

@cdalvaro cdalvaro changed the title Add full_token to cask json output Add full_token and tap entries to cask json output (tap to formula json output too) Feb 7, 2021
@cdalvaro cdalvaro changed the title Add full_token and tap entries to cask json output (tap to formula json output too) Add full_token and tap entries to cask json output Feb 7, 2021
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.

Looking good! A few suggestions:

Library/Homebrew/cask/cask.rb Outdated Show resolved Hide resolved
Library/Homebrew/test/cmd/info_spec.rb Outdated Show resolved Hide resolved
Library/Homebrew/cask/cask.rb Outdated Show resolved Hide resolved
Library/Homebrew/formula.rb Outdated Show resolved Hide resolved
@cdalvaro
Copy link
Contributor Author

cdalvaro commented Feb 8, 2021

CI / Syntax check has failed installing hadolint

@MikeMcQuaid
Copy link
Member

@cdalvaro Please rebase this on origin/master; we had to change the CI configuration. Thanks!

@cdalvaro
Copy link
Contributor Author

cdalvaro commented Feb 8, 2021

Done!

@Rylan12
Copy link
Member

Rylan12 commented Feb 8, 2021

Well done! Thank you so much for your first Hombrew PR, @cdalvaro! 🎉🥳

@Rylan12 Rylan12 merged commit 78f54b0 into Homebrew:master Feb 8, 2021
@cdalvaro
Copy link
Contributor Author

cdalvaro commented Feb 8, 2021

Thank you for your help, @Rylan12!

I'm very happy to have contributed to this great project! 🎉

@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Mar 11, 2021
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Mar 11, 2021
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.

Report Homebrew tap in casks
7 participants