Sha256: 537862014f38b3ac2ffcd46820f0af4b00aebb312b87627a2d855fa6447cc0e8
Contents?: true
Size: 653 Bytes
Versions: 2
Compression:
Stored size: 653 Bytes
Contents
require 'httparty' require 'deep_thought/ci_service/ci_service' module DeepThought module CIService class Janky < DeepThought::CIService::CIService def is_branch_green?(app, branch, hash) is_green = false response = HTTParty.get("#{@endpoint}/_hubot/#{app}/#{branch}", {:basic_auth => {:username => @username, :password => @password}}) builds = JSON.parse(response.body) builds.each do |build| if build['sha1'].to_s == hash.to_s if build['green'] is_green = true end break end end is_green end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
deep_thought-0.2.1 | lib/deep_thought/ci_service/janky.rb |
deep_thought-0.1.1 | lib/deep_thought/ci_service/janky.rb |