Skip to content

Conversation

caarlos0
Copy link
Member

@caarlos0 caarlos0 commented Jun 2, 2025

one-shot this quickly so I don't forget about it

refs #5800 (comment)

closes #5797

@caarlos0 caarlos0 requested a review from Copilot June 2, 2025 12:41
@caarlos0 caarlos0 self-assigned this Jun 2, 2025
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 2, 2025
Copy link

Deploying goreleaser with  Cloudflare Pages  Cloudflare Pages

Latest commit: f6eed3e
Status: ✅  Deploy successful!
Preview URL: https://6264a9de.goreleaser.pages.dev
Branch Preview URL: https://caskurl.goreleaser.pages.dev

View logs

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR restructures the Homebrew Cask URL configuration by replacing the flat url_template and url_additional fields with a unified url block that supports templating and additional download parameters.

  • Update docs to show the nested url: block with its subfields.
  • Define HomebrewCaskURL in config.go and remove old URL fields.
  • Refactor internal templates and code to use the new downloadURL type and nested fields.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
www/docs/customization/homebrew_casks.md Update documentation for new url: block syntax
pkg/config/config.go Introduce HomebrewCaskURL struct, drop old fields
internal/pipe/cask/templates/*.rb Reference element.URL.* instead of flat fields
internal/pipe/cask/template.go Add downloadURL type, update releasePackage
internal/pipe/cask/cask.go Populate and apply nested cfg.URL data
internal/pipe/cask/cask_test.go Update tests to set and expect nested URL fields
Comments suppressed due to low confidence (3)

pkg/config/config.go:247

  • [nitpick] Consider renaming the unexported type downloadURL to a more descriptive name (e.g. caskDownloadConfig) to clarify its purpose and avoid confusion with the standard net/url package.
type downloadURL struct {

internal/pipe/cask/templates/additional_url_params.rb:9

  • [nitpick] Ruby style guides often discourage trailing commas in hash literals; consider omitting the comma after the last entry to improve compatibility with linters.
        cookies: {

www/docs/customization/homebrew_casks.md:74

  • Indent this comment to match the url: block (add two more spaces) so that it clearly belongs under url: alongside template: and other subfields.
# Templates: allowed.

Copy link

codecov bot commented Jun 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.94%. Comparing base (c356f7d) to head (f6eed3e).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5803   +/-   ##
=======================================
  Coverage   82.93%   82.94%           
=======================================
  Files         163      163           
  Lines       16298    16307    +9     
=======================================
+ Hits        13517    13526    +9     
  Misses       2190     2190           
  Partials      591      591           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@caarlos0 caarlos0 merged commit b5bd97e into main Jun 2, 2025
18 of 19 checks passed
@caarlos0 caarlos0 deleted the caskurl branch June 2, 2025 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support specifying additional url parameters in Homebrew Cask
1 participant