Add missing SystemCommand::Mixin to update-sponsors

This commit is contained in:
Douglas Eichelberger 2024-01-31 19:55:13 -08:00
parent f5068ab317
commit 07eb24d220

View File

@ -3,15 +3,16 @@
require "cli/parser" require "cli/parser"
require "utils/github" require "utils/github"
require "system_command"
module Homebrew module Homebrew
module_function extend SystemCommand::Mixin
NAMED_MONTHLY_AMOUNT = 100 NAMED_MONTHLY_AMOUNT = 100
URL_MONTHLY_AMOUNT = 1000 URL_MONTHLY_AMOUNT = 1000
sig { returns(CLI::Parser) } sig { returns(CLI::Parser) }
def update_sponsors_args def self.update_sponsors_args
Homebrew::CLI::Parser.new do Homebrew::CLI::Parser.new do
description <<~EOS description <<~EOS
Update the list of GitHub Sponsors in the `Homebrew/brew` README. Update the list of GitHub Sponsors in the `Homebrew/brew` README.
@ -21,19 +22,19 @@ module Homebrew
end end
end end
def sponsor_name(sponsor) def self.sponsor_name(sponsor)
sponsor[:name] || sponsor[:login] sponsor[:name] || sponsor[:login]
end end
def sponsor_logo(sponsor) def self.sponsor_logo(sponsor)
"https://github.com/#{sponsor[:login]}.png?size=64" "https://github.com/#{sponsor[:login]}.png?size=64"
end end
def sponsor_url(sponsor) def self.sponsor_url(sponsor)
"https://github.com/#{sponsor[:login]}" "https://github.com/#{sponsor[:login]}"
end end
def update_sponsors def self.update_sponsors
update_sponsors_args.parse update_sponsors_args.parse
named_sponsors = [] named_sponsors = []