diff options
| author | Mike McQuaid | 2013-06-15 10:44:08 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2013-06-15 10:44:29 +0100 |
| commit | 66cefb7be6cd30f026beddcc90637436262ee372 (patch) | |
| tree | cfb125f8b8ec3e1e0e9a609c652fbf88923ed898 /Library | |
| parent | 731d4016f78e2383dff57393a875df929e80cc3a (diff) | |
| download | brew-66cefb7be6cd30f026beddcc90637436262ee372.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) |
