Method: CIRunner::Client::Github#download_log

Defined in:
lib/ci_runner/client/github.rb

#download_log(repository, check_run_id) ⇒ Tempfile, IO

Makes two requests to get the CI log for a check run. The first request returns a 302 containing a Location header poiting to a short lived url to download the log. The second request is to actually download the log.

Parameters:

  • repository (String)

    The full repository name, including the owner (rails/rails)

  • check_run_id (Integer)

    The GitHub ID of the check run.

Returns:

  • (Tempfile, IO)

    Depending on the size of the response. Quirk of URI.open.

See Also:



59
60
61
62
63
# File 'lib/ci_runner/client/github.rb', line 59

def download_log(repository, check_run_id)
  download_url = get("/repos/#{repository}/actions/jobs/#{check_run_id}/logs")

  URI.open(download_url)
end