Module: Octokit::Client::ActionsWorkflowJobs
- Included in:
- Octokit::Client
- Defined in:
- lib/octokit/client/actions_workflow_jobs.rb
Overview
Methods for the Actions Workflows jobs API
Instance Method Summary collapse
-
#workflow_run_attempt_jobs(repo, run_id, attempt_number, options = {}) ⇒ Sawyer::Resource
(also: #list_workflow_run_attempt_jobs)
List jobs for a workflow run attempt.
-
#workflow_run_job(repo, job_id, options = {}) ⇒ Sawyer::Resource
Get a job for a workflow run.
-
#workflow_run_job_logs(repo, job_id, options = {}) ⇒ String
Download job logs for a workflow run.
-
#workflow_run_jobs(repo, run_id, options = {}) ⇒ Sawyer::Resource
(also: #list_workflow_run_jobs)
List jobs for a workflow run.
Instance Method Details
#workflow_run_attempt_jobs(repo, run_id, attempt_number, options = {}) ⇒ Sawyer::Resource Also known as: list_workflow_run_attempt_jobs
List jobs for a workflow run attempt
42 43 44 45 46 |
# File 'lib/octokit/client/actions_workflow_jobs.rb', line 42 def workflow_run_attempt_jobs(repo, run_id, attempt_number, = {}) paginate "#{Repository.path repo}/actions/runs/#{run_id}/attempts/#{attempt_number}/jobs", do |data, last_response| data.jobs.concat last_response.data.jobs end end |
#workflow_run_job(repo, job_id, options = {}) ⇒ Sawyer::Resource
Get a job for a workflow run
16 17 18 |
# File 'lib/octokit/client/actions_workflow_jobs.rb', line 16 def workflow_run_job(repo, job_id, = {}) get "#{Repository.path repo}/actions/jobs/#{job_id}", end |
#workflow_run_job_logs(repo, job_id, options = {}) ⇒ String
Download job logs for a workflow run
27 28 29 30 31 32 |
# File 'lib/octokit/client/actions_workflow_jobs.rb', line 27 def workflow_run_job_logs(repo, job_id, = {}) url = "#{Repository.path repo}/actions/jobs/#{job_id}/logs" response = client_without_redirects.head(url, ) response.headers['Location'] end |
#workflow_run_jobs(repo, run_id, options = {}) ⇒ Sawyer::Resource Also known as: list_workflow_run_jobs
List jobs for a workflow run
57 58 59 60 61 |
# File 'lib/octokit/client/actions_workflow_jobs.rb', line 57 def workflow_run_jobs(repo, run_id, = {}) paginate "#{Repository.path repo}/actions/runs/#{run_id}/jobs", do |data, last_response| data.jobs.concat last_response.data.jobs end end |