Module: Octokit::Client::Checks
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Defined in: | lib/octokit/client/checks.rb |
Overview
Methods for the Checks
API
Instance Method Summary
-
#check_run(repo, id, options = {}) ⇒ Sawyer::Resource
Get a single check run.
-
#check_run_annotations(repo, id, options = {}) ⇒ Array<Sawyer::Resource>
List annotations for a check run.
-
#check_runs_for_check_suite(repo, id, options = {}) ⇒ Sawyer::Resource
(also: #list_check_runs_for_check_suite)
List check runs in a check suite.
-
#check_runs_for_ref(repo, ref, options = {}) ⇒ Sawyer::Resource
(also: #list_check_runs_for_ref)
List check runs for a specific ref.
-
#check_suite(repo, id, options = {}) ⇒ Sawyer::Resource
Get a single check suite.
-
#check_suites_for_ref(repo, ref, options = {}) ⇒ Sawyer::Resource
(also: #list_check_suites_for_ref)
List check suites for a specific ref.
-
#create_check_run(repo, name, head_sha, options = {}) ⇒ Sawyer::Resource
Create a check run.
-
#create_check_suite(repo, head_sha, options = {}) ⇒ Sawyer::Resource
Create a check suite.
-
#list_check_runs_for_check_suite(repo, id, options = {})
Alias for #check_runs_for_check_suite.
-
#list_check_runs_for_ref(repo, ref, options = {})
Alias for #check_runs_for_ref.
-
#list_check_suites_for_ref(repo, ref, options = {})
Alias for #check_suites_for_ref.
-
#rerequest_check_suite(repo, id, options = {}) ⇒ Boolean
Rerequest check suite.
-
#set_check_suite_preferences(repo, options = {}) ⇒ Sawyer::Resource
Set preferences for check suites on a repository.
-
#update_check_run(repo, id, options = {}) ⇒ Sawyer::Resource
Update a check run.
Instance Method Details
#check_run(repo, id, options = {}) ⇒ Sawyer::Resource
Get a single check run
# File 'lib/octokit/client/checks.rb', line 100
def check_run(repo, id, = {}) get "#{Repository.path repo}/check-runs/#{id}", end
#check_run_annotations(repo, id, options = {}) ⇒ Array
<Sawyer::Resource
>
List annotations for a check run
# File 'lib/octokit/client/checks.rb', line 115
def check_run_annotations(repo, id, = {}) paginate "#{Repository.path repo}/check-runs/#{id}/annotations", end
#check_runs_for_check_suite(repo, id, options = {}) ⇒ Sawyer::Resource
Also known as: #list_check_runs_for_check_suite
List check runs in a check suite
# File 'lib/octokit/client/checks.rb', line 86
def check_runs_for_check_suite(repo, id, = {}) paginate "#{Repository.path repo}/check-suites/#{id}/check-runs", do |data, last_response| data.check_runs.concat last_response.data.check_runs data.total_count += last_response.data.total_count end end
#check_runs_for_ref(repo, ref, options = {}) ⇒ Sawyer::Resource
Also known as: #list_check_runs_for_ref
List check runs for a specific ref
# File 'lib/octokit/client/checks.rb', line 62
def check_runs_for_ref(repo, ref, = {}) paginate "#{Repository.path repo}/commits/#{ref}/check-runs", do |data, last_response| data.check_runs.concat last_response.data.check_runs data.total_count += last_response.data.total_count end end
#check_suite(repo, id, options = {}) ⇒ Sawyer::Resource
Get a single check suite
# File 'lib/octokit/client/checks.rb', line 129
def check_suite(repo, id, = {}) get "#{Repository.path repo}/check-suites/#{id}", end
#check_suites_for_ref(repo, ref, options = {}) ⇒ Sawyer::Resource
Also known as: #list_check_suites_for_ref
List check suites for a specific ref
# File 'lib/octokit/client/checks.rb', line 148
def check_suites_for_ref(repo, ref, = {}) paginate "#{Repository.path repo}/commits/#{ref}/check-suites", do |data, last_response| data.check_suites.concat last_response.data.check_suites data.total_count += last_response.data.total_count end end
#create_check_run(repo, name, head_sha, options = {}) ⇒ Sawyer::Resource
Create a check run
# File 'lib/octokit/client/checks.rb', line 25
def create_check_run(repo, name, head_sha, = {}) [:name] = name [:head_sha] = head_sha post "#{Repository.path repo}/check-runs", end
#create_check_suite(repo, head_sha, options = {}) ⇒ Sawyer::Resource
Create a check suite
# File 'lib/octokit/client/checks.rb', line 182
def create_check_suite(repo, head_sha, = {}) [:head_sha] = head_sha post "#{Repository.path repo}/check-suites", end
#list_check_runs_for_check_suite(repo, id, options = {})
Alias for #check_runs_for_check_suite.
# File 'lib/octokit/client/checks.rb', line 92
alias list_check_runs_for_check_suite check_runs_for_check_suite
#list_check_runs_for_ref(repo, ref, options = {})
Alias for #check_runs_for_ref.
# File 'lib/octokit/client/checks.rb', line 68
alias list_check_runs_for_ref check_runs_for_ref
#list_check_suites_for_ref(repo, ref, options = {})
Alias for #check_suites_for_ref.
# File 'lib/octokit/client/checks.rb', line 154
alias list_check_suites_for_ref check_suites_for_ref
#rerequest_check_suite(repo, id, options = {}) ⇒ Boolean
Rerequest check suite
# File 'lib/octokit/client/checks.rb', line 194
def rerequest_check_suite(repo, id, = {}) post "#{Repository.path repo}/check-suites/#{id}/rerequest", true end
#set_check_suite_preferences(repo, options = {}) ⇒ Sawyer::Resource
Set preferences for check suites on a repository
# File 'lib/octokit/client/checks.rb', line 168
def set_check_suite_preferences(repo, = {}) patch "#{Repository.path repo}/check-suites/preferences", end
#update_check_run(repo, id, options = {}) ⇒ Sawyer::Resource
Update a check run
# File 'lib/octokit/client/checks.rb', line 42
def update_check_run(repo, id, = {}) patch "#{Repository.path repo}/check-runs/#{id}", end