aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/dev-cmd/pull.rb21
1 files changed, 13 insertions, 8 deletions
diff --git a/Library/Homebrew/dev-cmd/pull.rb b/Library/Homebrew/dev-cmd/pull.rb
index 0e3b37e3f..79b9da9eb 100644
--- a/Library/Homebrew/dev-cmd/pull.rb
+++ b/Library/Homebrew/dev-cmd/pull.rb
@@ -58,6 +58,18 @@ require "tap"
require "version"
require "pkg_version"
+module GitHub
+ module_function
+
+ # Return the corresponding test-bot user name for the given GitHub organization.
+ def test_bot_user(user)
+ test_bot = ARGV.value "test-bot-user"
+ return test_bot if test_bot
+ return "BrewTestBot" if user.casecmp("homebrew").zero?
+ "#{user.capitalize}TestBot"
+ end
+end
+
module Homebrew
module_function
@@ -231,7 +243,7 @@ module Homebrew
url
else
bottle_branch = "pull-bottle-#{issue}"
- "https://github.com/#{test_bot_user user}/homebrew-#{tap.repo}/compare/#{user}:master...pr-#{issue}"
+ "https://github.com/#{GitHub.test_bot_user user}/homebrew-#{tap.repo}/compare/#{user}:master...pr-#{issue}"
end
curl "--silent", "--fail", "--output", "/dev/null", "--head", bottle_commit_url
@@ -259,13 +271,6 @@ module Homebrew
verify_bintray_published(bintray_published_formulae)
end
- def test_bot_user(user)
- test_bot = ARGV.value "test-bot-user"
- return test_bot if test_bot
- return "BrewTestBot" if user.casecmp("homebrew").zero?
- "#{user.capitalize}TestBot"
- end
-
def force_utf8!(str)
str.force_encoding("UTF-8") if str.respond_to?(:force_encoding)
end