class Environments::Github

Public Class Methods

is_github?() click to toggle source
# File lib/flakyci_rspec/environments/github.rb, line 29
def self.is_github?()
  ENV["GITHUB_SHA"] != nil
end

Public Instance Methods

build_id() click to toggle source
# File lib/flakyci_rspec/environments/github.rb, line 21
def build_id() 
  ENV["GITHUB_RUN_ID"]
end
build_name() click to toggle source
# File lib/flakyci_rspec/environments/github.rb, line 25
def build_name() 
  ENV["GITHUB_WORKFLOW"]
end
get_infos() click to toggle source
# File lib/flakyci_rspec/environments/github.rb, line 3
def get_infos() 
  {
    sha: sha(),
    build_id: build_id(),
    ref: get_ref(),
    build_name: build_name(),
    env_name: "github"
  }
end
get_ref() click to toggle source
# File lib/flakyci_rspec/environments/github.rb, line 17
def get_ref() 
  ENV["GITHUB_REF"].tr("refs/heads/", "")
end
sha() click to toggle source
# File lib/flakyci_rspec/environments/github.rb, line 13
def sha() 
  ENV["GITHUB_SHA"]
end