Module: Octokit::Client::Checks
- Included in:
- Octokit::Client
- Defined in:
- lib/octokit/client/checks.rb
Overview
Methods for the Checks API
Instance Method Summary collapse
-
#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.
-
#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
101 102 103 104 105 |
# File 'lib/octokit/client/checks.rb', line 101 def check_run(repo, id, = {}) ensure_api_media_type(:checks, ) get "#{Repository.path repo}/check-runs/#{id}", end |
#check_run_annotations(repo, id, options = {}) ⇒ Array<Sawyer::Resource>
List annotations for a check run
118 119 120 121 122 |
# File 'lib/octokit/client/checks.rb', line 118 def check_run_annotations(repo, id, = {}) ensure_api_media_type(:checks, ) get "#{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
88 89 90 91 92 |
# File 'lib/octokit/client/checks.rb', line 88 def check_runs_for_check_suite(repo, id, = {}) ensure_api_media_type(:checks, ) get "#{Repository.path repo}/check-suites/#{id}/check-runs", 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
65 66 67 68 69 |
# File 'lib/octokit/client/checks.rb', line 65 def check_runs_for_ref(repo, ref, = {}) ensure_api_media_type(:checks, ) get "#{Repository.path repo}/commits/#{ref}/check-runs", end |
#check_suite(repo, id, options = {}) ⇒ Sawyer::Resource
Get a single check suite
134 135 136 137 138 |
# File 'lib/octokit/client/checks.rb', line 134 def check_suite(repo, id, = {}) ensure_api_media_type(:checks, ) 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
155 156 157 158 159 |
# File 'lib/octokit/client/checks.rb', line 155 def check_suites_for_ref(repo, ref, = {}) ensure_api_media_type(:checks, ) get "#{Repository.path repo}/commits/#{ref}/check-suites", end |
#create_check_run(repo, name, head_sha, options = {}) ⇒ Sawyer::Resource
Create a check run
25 26 27 28 29 30 31 |
# File 'lib/octokit/client/checks.rb', line 25 def create_check_run(repo, name, head_sha, = {}) ensure_api_media_type(:checks, ) [: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
190 191 192 193 194 195 |
# File 'lib/octokit/client/checks.rb', line 190 def create_check_suite(repo, head_sha, = {}) ensure_api_media_type(:checks, ) [:head_sha] = head_sha post "#{Repository.path repo}/check-suites", end |
#rerequest_check_suite(repo, id, options = {}) ⇒ Boolean
Rerequest check suite
203 204 205 206 207 208 |
# File 'lib/octokit/client/checks.rb', line 203 def rerequest_check_suite(repo, id, = {}) ensure_api_media_type(:checks, ) 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
174 175 176 177 178 |
# File 'lib/octokit/client/checks.rb', line 174 def set_check_suite_preferences(repo, = {}) ensure_api_media_type(:checks, ) patch "#{Repository.path repo}/check-suites/preferences", end |
#update_check_run(repo, id, options = {}) ⇒ Sawyer::Resource
Update a check run
43 44 45 46 47 |
# File 'lib/octokit/client/checks.rb', line 43 def update_check_run(repo, id, = {}) ensure_api_media_type(:checks, ) patch "#{Repository.path repo}/check-runs/#{id}", end |