diff options
| author | Mike McQuaid | 2013-06-15 10:44:08 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2013-06-15 10:44:29 +0100 |
| commit | 4a36322c41b99e2a0d497c53cf13d7d9f8ef032e (patch) | |
| tree | 419a859cb4c8931a83057cbfa73f7339b2a84192 /Library | |
| parent | 53c6582612b64aa02a2fc455e29879bd43a1f93c (diff) | |
| download | homebrew-4a36322c41b99e2a0d497c53cf13d7d9f8ef032e.tar.bz2 | |
brew-test-bot: handle Jenkins pull request plugin.
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/Contributions/cmd/brew-test-bot.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Library/Contributions/cmd/brew-test-bot.rb b/Library/Contributions/cmd/brew-test-bot.rb index 7d9538bce..8a9289aac 100755 --- a/Library/Contributions/cmd/brew-test-bot.rb +++ b/Library/Contributions/cmd/brew-test-bot.rb @@ -162,6 +162,17 @@ class Test diff_end_sha1 = current_sha1 end + # Handle Jenkins pull request builder plugin. + if ENV['ghprbPullId'] and ENV['GIT_URL'] + git_url = ENV['GIT_URL'] + git_match = git_url.match %r{.*github.com[:/](\w+/\w+).*} + if git_match + github_repo = git_match[1] + pull_id = ENV['ghprbPullId'] + @url = "https://github.com/#{github_repo}/pull/#{pull_id}" + end + end + if @hash == 'HEAD' if diff_start_sha1 == diff_end_sha1 or \ single_commit?(diff_start_sha1, diff_end_sha1) |
