Class: CC::PullRequests

Inherits:
Service show all
Defined in:
lib/cc/pull_requests.rb

Constant Summary

Constants inherited from Service

Service::ABSTRACT_SLUGS, Service::ALL_EVENTS, Service::ConfigurationError, Service::Error

Constants included from Service::Helper

Service::Helper::GREEN_HEX, Service::Helper::RED_HEX

Constants included from Service::HTTP

Service::HTTP::REDIRECT_CODES

Instance Attribute Summary

Attributes inherited from Service

#config, #event, #payload

Instance Method Summary collapse

Methods inherited from Service

by_slug, inherited, #initialize, load_services, #receive, services, slug

Methods included from Service::Helper

#changed, #color, #compare_url, #details_url, #emoji, #hex_color, #improved?, #repo_name

Methods included from Service::HTTP

#ca_file, #formatted_post_response, #http, #http_method, #raw_get, #raw_post, #service_get, #service_post, #service_post_with_redirects

Constructor Details

This class inherits a constructor from CC::Service

Instance Method Details

#receive_pull_requestObject



8
9
10
# File 'lib/cc/pull_requests.rb', line 8

def receive_pull_request
  receive_request(%w[pending success failure skipped error], :update_status)
end

#receive_pull_request_coverageObject



12
13
14
# File 'lib/cc/pull_requests.rb', line 12

def receive_pull_request_coverage
  receive_request("success", :update_coverage_status)
end

#receive_pull_request_diff_coverageObject



16
17
18
# File 'lib/cc/pull_requests.rb', line 16

def receive_pull_request_diff_coverage
  receive_request(%w[pending skipped], :update_diff_coverage_status)
end

#receive_pull_request_total_coverageObject



20
21
22
# File 'lib/cc/pull_requests.rb', line 20

def receive_pull_request_total_coverage
  receive_request(%w[pending skipped], :update_total_coverage_status)
end

#receive_testObject



2
3
4
5
6
# File 'lib/cc/pull_requests.rb', line 2

def receive_test
  setup_http

  receive_test_status
end