Class: CIRunner::Check::Github

Inherits:
Base
  • Object
show all
Defined in:
lib/ci_runner/check/github.rb

Overview

Check class used when a project is configured to run its CI using GitHub actions.

Instance Attribute Summary collapse

Attributes inherited from Base

#commit, #name, #repository, #status

Instance Method Summary collapse

Methods inherited from Base

#failed?, #success?

Constructor Details

#initialize(*args, id) ⇒ Github

Returns a new instance of Github.

Parameters:



15
16
17
18
19
# File 'lib/ci_runner/check/github.rb', line 15

def initialize(*args, id)
  super(*args)

  @id = id
end

Instance Attribute Details

#idObject (readonly)

:private:



11
12
13
# File 'lib/ci_runner/check/github.rb', line 11

def id
  @id
end

Instance Method Details

#download_logSee Client::Github#download_log

Download the log output for thig GitHub build.



33
34
35
36
37
# File 'lib/ci_runner/check/github.rb', line 33

def download_log
  github_client = Client::Github.new(Configuration::User.instance.github_token)

  github_client.download_log(@repository, @id)
end

#providerString

Used to tell the user which CI provider we are downloading the log output from.

Returns:

  • (String)


24
25
26
# File 'lib/ci_runner/check/github.rb', line 24

def provider
  "GitHub"
end