123456789_123456789_123456789_123456789_123456789_

Module: Octokit::Client::ActionsWorkflowJobs

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/octokit/client/actions_workflow_jobs.rb

Overview

Methods for the Actions Workflows jobs API

Instance Method Summary

Instance Method Details

#list_workflow_run_attempt_jobs(repo, run_id, attempt_number, options = {})

[ GitHub ]

  
# File 'lib/octokit/client/actions_workflow_jobs.rb', line 47

alias list_workflow_run_attempt_jobs workflow_run_attempt_jobs

#list_workflow_run_jobs(repo, run_id, options = {})

Alias for #workflow_run_jobs.

[ GitHub ]

  
# File 'lib/octokit/client/actions_workflow_jobs.rb', line 62

alias list_workflow_run_jobs workflow_run_jobs

#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

Parameters:

  • repo (Integer, String, Repository, Hash)

    A GitHub repository

  • run_id (Integer, String)

    Id of the workflow run

  • attempt_number (Integer, String)

    Attempt number of the workflow run

Returns:

  • (Sawyer::Resource)

    Jobs information

See Also:

[ GitHub ]

  
# 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 = {}) ⇒ Sawyer::Resource

Get a job for a workflow run

Parameters:

  • repo (Integer, String, Repository, Hash)

    A GitHub repository

  • job_id (Integer, String)

    Id of the job

Returns:

  • (Sawyer::Resource)

    Job information

See Also:

[ GitHub ]

  
# 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 = {}) ⇒ String

Download job logs for a workflow run

Parameters:

  • repo (Integer, String, Repository, Hash)

    A GitHub repository

  • job_id (Integer, String)

    Id of the job

Returns:

  • (String)

    URL to the archived log files of the job

See Also:

[ GitHub ]

  
# 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 = {}) ⇒ Sawyer::Resource Also known as: #list_workflow_run_jobs

List jobs for a workflow run

Parameters:

  • repo (Integer, String, Repository, Hash)

    A GitHub repository

  • run_id (Integer, String)

    Id of the workflow run

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :filter (String)

    Optional filtering by a completed_at timestamp

Returns:

  • (Sawyer::Resource)

    Jobs information

See Also:

[ GitHub ]

  
# 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