Skip to content

feat: add custom download strategy#50

Merged
maxcleme merged 2 commits intomainfrom
custom-download-strategy
Mar 4, 2026
Merged

feat: add custom download strategy#50
maxcleme merged 2 commits intomainfrom
custom-download-strategy

Conversation

@gabolaev
Copy link
Copy Markdown
Member

@gabolaev gabolaev commented Mar 4, 2026

No description provided.

@gabolaev gabolaev requested a review from a team March 4, 2026 15:50
@gabolaev gabolaev force-pushed the custom-download-strategy branch from f5b02a3 to bf057f4 Compare March 4, 2026 15:52
@gabolaev gabolaev marked this pull request as draft March 4, 2026 15:52
@gabolaev gabolaev marked this pull request as ready for review March 4, 2026 15:53
Comment thread custom_download_strategy.rb Outdated
class GitHubPrivateRepositoryReleaseDownloadStrategy < AbstractFileDownloadStrategy
def initialize(url, name, version, **meta)
super
@github_token = ENV["HOMEBREW_GITHUB_API_TOKEN"]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can't we look at these two insteads? IMO these are far more common than HOMEBREW_GITHUB_API_TOKEN, right?

(I don't if || is the right way to do in ruby)

Suggested change
@github_token = ENV["HOMEBREW_GITHUB_API_TOKEN"]
@github_token = ENV["GH_TOKEN"] || ENV["GITHUB_TOKEN"]

Copy link
Copy Markdown
Member Author

@gabolaev gabolaev Mar 4, 2026

Choose a reason for hiding this comment

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

Homebrew can only read HOMEBREW_.* env vars

@gabolaev gabolaev force-pushed the custom-download-strategy branch 21 times, most recently from c2845a9 to 80e8b9f Compare March 4, 2026 16:55
@gabolaev gabolaev force-pushed the custom-download-strategy branch from 80e8b9f to 86702b1 Compare March 4, 2026 17:01
@maxcleme maxcleme merged commit 5772b04 into main Mar 4, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants