Skip to content

Commit

Permalink
use url_to instead of url string
Browse files Browse the repository at this point in the history
  • Loading branch information
hyuraku committed Nov 8, 2022
1 parent 903cac3 commit 5522cd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Library/Homebrew/utils/github.rb
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ def last_commit(user, repo, ref)
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?
Expand All @@ -691,7 +691,7 @@ def multiple_short_commits_exist?(user, repo, commit)
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?
Expand Down

0 comments on commit 5522cd1

Please sign in to comment.