From 5ea279df455112393cacd9d86c52b0a16787fcd9 Mon Sep 17 00:00:00 2001 From: Jaime Fullaondo Date: Thu, 23 Feb 2017 17:48:29 -0500 Subject: [PATCH] [travis][rakefile] only trigger build in SDK repos if not PRs. --- Rakefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Rakefile b/Rakefile index 8d558bd749..424e5a1bb2 100755 --- a/Rakefile +++ b/Rakefile @@ -93,6 +93,7 @@ namespace :ci do desc 'Trigger remote CI' task :trigger, :repo do |_, args| abort 'Task only applies to travis builds.' if !ENV['TRAVIS'] || !ENV['TRAVIS_API_TOKEN'] + abort 'Task skipped for Pull Requests.' if !ENV['TRAVIS_PULL_REQUEST'].nil? && ENV['TRAVIS_PULL_REQUEST'].downcase != 'false' repo = "DataDog%2F#{args[:repo]}" url = "https://api.travis-ci.org/repo/#{repo}/requests" body = { 'request' => { 'branch' => 'master' } }.to_json