module Octokit::Client::ActionsWorkflowJobs

Methods for the Actions Workflows jobs API

@see docs.github.com/rest/actions/workflow-jobs

Public Instance Methods

list_workflow_run_attempt_jobs(repo, run_id, attempt_number, options = {})
list_workflow_run_jobs(repo, run_id, options = {})
Alias for: workflow_run_jobs
workflow_run_attempt_jobs(repo, run_id, attempt_number, options = {}) click to toggle source

List jobs for a workflow run attempt

@param repo [Integer, String, Repository, Hash] A GitHub repository @param run_id [Integer, String] Id of the workflow run @param attempt_number [Integer, String] Attempt number of the workflow run

@return [Sawyer::Resource] Jobs information @see docs.github.com/rest/actions/workflow-jobs#list-jobs-for-a-workflow-run-attempt

# File lib/octokit/client/actions_workflow_jobs.rb, line 42
def workflow_run_attempt_jobs(repo, run_id, attempt_number, options = {})
  paginate "#{Repository.path repo}/actions/runs/#{run_id}/attempts/#{attempt_number}/jobs", options do |data, last_response|
    data.jobs.concat last_response.data.jobs
  end
end
workflow_run_job(repo, job_id, options = {}) click to toggle source

Get a job for a workflow run

@param repo [Integer, String, Repository, Hash] A GitHub repository @param job_id [Integer, String] Id of the job

@return [Sawyer::Resource] Job information @see docs.github.com/rest/actions/workflow-jobs#get-a-job-for-a-workflow-run

# File lib/octokit/client/actions_workflow_jobs.rb, line 16
def workflow_run_job(repo, job_id, options = {})
  get "#{Repository.path repo}/actions/jobs/#{job_id}", options
end
workflow_run_job_logs(repo, job_id, options = {}) click to toggle source

Download job logs for a workflow run

@param repo [Integer, String, Repository, Hash] A GitHub repository @param job_id [Integer, String] Id of the job

@return [String] URL to the archived log files of the job @see docs.github.com/rest/actions/workflow-jobs#download-job-logs-for-a-workflow-run

# File lib/octokit/client/actions_workflow_jobs.rb, line 27
def workflow_run_job_logs(repo, job_id, options = {})
  url = "#{Repository.path repo}/actions/jobs/#{job_id}/logs"

  response = client_without_redirects.head(url, options)
  response.headers['Location']
end
workflow_run_jobs(repo, run_id, options = {}) click to toggle source

List jobs for a workflow run

@param repo [Integer, String, Repository, Hash] A GitHub repository @param run_id [Integer, String] Id of the workflow run @option options [String] :filter Optional filtering by a ‘completed_at` timestamp

@return [Sawyer::Resource] Jobs information @see docs.github.com/rest/actions/workflow-jobs#list-jobs-for-a-workflow-run

# File lib/octokit/client/actions_workflow_jobs.rb, line 57
def workflow_run_jobs(repo, run_id, options = {})
  paginate "#{Repository.path repo}/actions/runs/#{run_id}/jobs", options do |data, last_response|
    data.jobs.concat last_response.data.jobs
  end
end
Also aliased as: list_workflow_run_jobs