Class: Bard::CLI::CI::GithubActions::Job
- Inherits:
-
Struct
- Object
- Struct
- Bard::CLI::CI::GithubActions::Job
- Defined in:
- lib/bard/ci/github_actions.rb
Instance Attribute Summary collapse
-
#api ⇒ Object
Returns the value of attribute api.
-
#json ⇒ Object
Returns the value of attribute json.
Instance Method Summary collapse
Instance Attribute Details
#api ⇒ Object
Returns the value of attribute api
116 117 118 |
# File 'lib/bard/ci/github_actions.rb', line 116 def api @api end |
#json ⇒ Object
Returns the value of attribute json
116 117 118 |
# File 'lib/bard/ci/github_actions.rb', line 116 def json @json end |
Instance Method Details
#id ⇒ Object
117 118 119 |
# File 'lib/bard/ci/github_actions.rb', line 117 def id json["id"] end |
#logs ⇒ Object
126 127 128 |
# File 'lib/bard/ci/github_actions.rb', line 126 def logs @logs ||= api.download_logs_by_job_id(id) end |
#time_elapsed ⇒ Object
121 122 123 124 |
# File 'lib/bard/ci/github_actions.rb', line 121 def time_elapsed Time.parse(json["completed_at"]).to_i - Time.parse(json["started_at"]).to_i end |