Class: Bard::CI::GithubActions::Job

Inherits:
Struct
  • Object
show all
Defined in:
lib/bard/ci/github_actions.rb

Instance Method Summary collapse

Instance Method Details

#idObject



187
188
189
# File 'lib/bard/ci/github_actions.rb', line 187

def id
  json["id"]
end

#logsObject



196
197
198
# File 'lib/bard/ci/github_actions.rb', line 196

def logs
  @logs ||= api.download_logs_by_job_id(id)
end

#time_elapsedObject



191
192
193
194
# File 'lib/bard/ci/github_actions.rb', line 191

def time_elapsed
  Time.parse(json["completed_at"]).to_i -
    Time.parse(json["started_at"]).to_i
end