Class: CC::PullRequests
Direct Known Subclasses
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
Instance Attribute Summary
Attributes inherited from Service
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_request ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/cc/pull_requests.rb', line 8 def receive_pull_request setup_http state = @payload["state"] if %w[pending success failure skipped error].include?(state) && report_status? send("update_status_#{state}") else @response = simple_failure("Unknown state") end response end |
#receive_pull_request_coverage ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/cc/pull_requests.rb', line 21 def receive_pull_request_coverage setup_http state = @payload["state"] if state == "success" && report_status? update_coverage_status_success else @response = simple_failure("Unknown state") end response end |
#receive_test ⇒ Object
2 3 4 5 6 |
# File 'lib/cc/pull_requests.rb', line 2 def receive_test setup_http receive_test_status end |