Class: CiToolkit::DvcsPrUtil

Inherits:
Object
  • Object
show all
Defined in:
lib/ci_toolkit/dvcs_pr.rb

Overview

Use this to provide commit status state for github or gitlab as values for the two services are different It uses the ENV to decide which DVCS to use.

Class Method Summary collapse

Class Method Details

.status_state_error(service = ENV.fetch("DVCS_SERVICE", nil)) ⇒ Object



114
115
116
117
118
# File 'lib/ci_toolkit/dvcs_pr.rb', line 114

def self.status_state_error(service = ENV.fetch("DVCS_SERVICE", nil))
  status = "error"
  status = "failed" if service == "gitlab"
  status
end

.status_state_pending(service = ENV.fetch("DVCS_SERVICE", nil)) ⇒ Object



120
121
122
123
124
# File 'lib/ci_toolkit/dvcs_pr.rb', line 120

def self.status_state_pending(service = ENV.fetch("DVCS_SERVICE", nil))
  status = "pending"
  status = "running" if service == "gitlab"
  status
end