Class: CiToolkit::DvcsPrFactory

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

Overview

Use this to create an instance of Dvcs implementation based on the service type set in an environment value called DVCS_SERVICW with value of either gitlab or github

Class Method Summary collapse

Class Method Details

.create(bitrise_env = CiToolkit::BitriseEnv.new) ⇒ Object



14
15
16
17
# File 'lib/ci_toolkit/dvcs_pr_factory.rb', line 14

def self.create(bitrise_env = CiToolkit::BitriseEnv.new)
  service = ENV.fetch("DVCS_SERVICE", nil)
  (SERVICES[service.to_s.downcase] || CiToolkit::DvcsPr).new bitrise_env
end