ci_toolkit 1.5.4 → 1.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5cedc7fa6c13bd1256e5724b8c36852f39c1893a99f55ebfef23fe1d7e99ab4a
4
- data.tar.gz: 0e50375d5c21fcd106dfe9013de91a55f93ce5b805203d9d4867dc16270ad576
3
+ metadata.gz: 6d09aaba9d8cf3b06b0cf990f59346ebd0b60b461569a062f57eaee7343474b2
4
+ data.tar.gz: 0f12abd8ebbb6abf38705c948d4c2f651413c918828b3008118a18cb1b7082de
5
5
  SHA512:
6
- metadata.gz: 74cdb925c2a57bcafbc4f5e663b21dd461203117e1e6c1bb71ea4489ad6b92e51cad298de9af2f820bf7bb8b61b14ba3a8d1cd1501cfba3a6c5b85fa88e0702a
7
- data.tar.gz: 8b739f154a353585d1fdfba66f9d2d277217ab5e65d33923fb72af1632870bfe1bb4baaa49ec98117d43c56cfd3ab9c563ae0b17623e58107342d1a722ab643c
6
+ metadata.gz: 404cd49f9ecd10a0959d540e13ff9bd2f40e2804af2949e1fc1f3b987eb68d51a841bb722baef9bfd60c05c3cdf4a7a6e988115d219fa276fab8a7409e253f66
7
+ data.tar.gz: 522b89584b12430ae41f5a977ea3c1d0dae10c81d4be7e0fe561d3878cb03b2fa031a0007626f7df89e6efccefec755215344cbfb23f56e57e4d174a52c49f62
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ci_toolkit (1.5.4)
4
+ ci_toolkit (1.5.5)
5
5
  faraday
6
6
  faraday_middleware
7
7
  gitlab
@@ -40,8 +40,8 @@ module CiToolkit
40
40
  @github.create_status(state, @context, @env.app_url, "Finished building #{num_finished}/#{num_total}")
41
41
  end
42
42
 
43
- def error
44
- @github.create_status("error", @context, @env.app_url, "Building failed")
43
+ def error(state = CiToolkit::DvcsPrUtil.status_state)
44
+ @github.create_status(state, @context, @env.app_url, "Building failed")
45
45
  end
46
46
 
47
47
  private
@@ -102,4 +102,15 @@ module CiToolkit
102
102
  CiToolkit::DvcsPr.api_not_implemented(self)
103
103
  end
104
104
  end
105
+
106
+ # Use this to provide commit status state for github or gitlab as
107
+ # values for the two services are different
108
+ # It uses the ENV["DVCS_SERVICE"] to decide which DVCS to use.
109
+ class DvcsPrUtil
110
+ def self.status_state(service = ENV["DVCS_SERVICE"])
111
+ status = "error"
112
+ status = "failed" if service == "gitlab"
113
+ status
114
+ end
115
+ end
105
116
  end
@@ -6,7 +6,7 @@ module CiToolkit
6
6
  attr_reader :ticket
7
7
 
8
8
  def initialize(
9
- github_pr = CiToolkit::GithubPr.new,
9
+ github_pr = CiToolkit::DvcsPrFactory.create(CiToolkit::BitriseEnv.new),
10
10
  git = CiToolkit::Git.new,
11
11
  ticket_regex_keys = ENV["SUPPORTED_JIRA_PROJECT_KEYS_REGEX"]
12
12
  )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ci_toolkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.4
4
+ version: 1.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gero Keller