diff options
| author | Mike McQuaid | 2017-06-19 15:46:48 +0100 |
|---|---|---|
| committer | GitHub | 2017-06-19 15:46:48 +0100 |
| commit | cd7e3cd39d4fd48cedf0963c1660fe9a70544ad5 (patch) | |
| tree | a06a73a998def9c6e91b2c82a408e9cb9e651f9f /Library/Homebrew/utils | |
| parent | b05545a3bf5e22bcf845d0c2f58cae745431c98c (diff) | |
| parent | c2899b65591c2a966ccfa87f0cdd47dac8fd0781 (diff) | |
| download | brew-cd7e3cd39d4fd48cedf0963c1660fe9a70544ad5.tar.bz2 | |
Merge pull request #2778 from jasonkarns/tap-full-name
refactor: DRY up redundant formulations of {#user}/homebrew-{#repo}
Diffstat (limited to 'Library/Homebrew/utils')
| -rw-r--r-- | Library/Homebrew/utils/github.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/utils/github.rb b/Library/Homebrew/utils/github.rb index 5ba381529..1a781cee6 100644 --- a/Library/Homebrew/utils/github.rb +++ b/Library/Homebrew/utils/github.rb @@ -291,8 +291,8 @@ module GitHub prs.each { |i| puts "#{i["title"]} (#{i["html_url"]})" } end - def private_repo?(user, repo) - uri = URI.parse("#{API_URL}/repos/#{user}/#{repo}") + def private_repo?(full_name) + uri = URI.parse("#{API_URL}/repos/#{full_name}") open(uri) { |json| json["private"] } end end |
