From 43b85e58656a7036e43ff064c834c8ba73b7b401 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 15 Jun 2013 11:15:31 +0100 Subject: [PATCH] brew-test-bot: further tweak pull request handling. --- Library/Contributions/cmd/brew-test-bot.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Library/Contributions/cmd/brew-test-bot.rb b/Library/Contributions/cmd/brew-test-bot.rb index b0b97c791c..2b9fada1c5 100755 --- a/Library/Contributions/cmd/brew-test-bot.rb +++ b/Library/Contributions/cmd/brew-test-bot.rb @@ -152,7 +152,8 @@ class Test @start_branch = current_branch # Use Jenkins environment variables if present. - if ENV['GIT_PREVIOUS_COMMIT'] and ENV['GIT_COMMIT'] + if ENV['GIT_PREVIOUS_COMMIT'] and ENV['GIT_COMMIT'] \ + and not ENV['ghprbPullId'] diff_start_sha1 = shorten_revision ENV['GIT_PREVIOUS_COMMIT'] diff_end_sha1 = shorten_revision ENV['GIT_COMMIT'] test "brew update" if current_branch == "master" @@ -171,6 +172,8 @@ class Test pull_id = ENV['ghprbPullId'] @url = "https://github.com/#{github_repo}/pull/#{pull_id}" @hash = nil + else + puts "Invalid 'ghprbPullId' environment variable value!" end end