From 5522cd106f57238c43e6a33a251f1b14f123cbb3 Mon Sep 17 00:00:00 2001 From: hyuraku <32809703+hyuraku@users.noreply.github.com> Date: Tue, 8 Nov 2022 18:54:18 +0900 Subject: [PATCH] use url_to instead of url string --- Library/Homebrew/utils/github.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/utils/github.rb b/Library/Homebrew/utils/github.rb index 78581ee724..712ffda7b3 100644 --- a/Library/Homebrew/utils/github.rb +++ b/Library/Homebrew/utils/github.rb @@ -673,7 +673,7 @@ module GitHub output, _, status = curl_output( "--silent", "--head", "--location", "--header", "Accept: application/vnd.github.sha", - "https://api.github.com/repos/#{user}/#{repo}/commits/#{ref}" + url_to("repos", user, repo, "commits", ref).to_s ) return unless status.success? @@ -691,7 +691,7 @@ module GitHub output, _, status = curl_output( "--silent", "--head", "--location", "--header", "Accept: application/vnd.github.sha", - "https://api.github.com/repos/#{user}/#{repo}/commits/#{commit}" + url_to("repos", user, repo, "commits", commit).to_s ) return true if status.success?