# Trigger a travis build | |
post "/push-webhook" do | |
uri = URI.parse("https://api.travis-ci.org/repo/your-org/your-repo/requests") | |
request = Net::HTTP::Get.new(uri.request_uri) | |
request["Content-Type"] = "application/json" | |
request["Accept"] = "application/json" | |
request["Travis-API-Version"] = "3" | |
request["Authorization"] = "token your-token" | |
body = { "request" => { "branch" => "master" } } | |
request.body = body.to_json | |
response = http.request(request) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment