lib/github-status/support/params.rb in concourse-github-status-0.6.6 vs lib/github-status/support/params.rb in concourse-github-status-0.7.0

- old
+ new

@@ -34,8 +34,17 @@ Contract None => Array def statuses @statuses ||= params.fetch 'statuses', [] end + + Contract None => String + def target_url + url = params.fetch 'target_url', "#{atc_external_url}/builds/#{build_id}" + if File.file?(url) + url = File.read(url).chomp + end + @target_url ||= url + end end end end