danger 6.0.1 → 6.0.2
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 +4 -4
- data/lib/danger/ci_source/cirrus.rb +33 -0
- data/lib/danger/ci_source/gitlab_ci.rb +1 -1
- data/lib/danger/ci_source/jenkins.rb +2 -0
- data/lib/danger/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d812582b1d50574cecbc874f8e746a7e070f97decce7470b1616abd8871dd3d
|
4
|
+
data.tar.gz: 44a6746b63eef45617e9ba0057b1319539bfcdaabd3a359b561f3dd2ff4d3c65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54479ef3587f4486a282323894e32778e5dcc4c21d41410fddc25f2d02e581c692dfe488755828aff27e04115076031d032261f1e45ab60ff41df6ba429dd12a
|
7
|
+
data.tar.gz: 28b3b370371b9426168e57ebbce738bc5e7771b8dc7f223f49aa19d5de4bc62047c845720316074b677ca1e1ee387d65b24406077d0d532b764edc0c84f07ad8
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require "danger/request_sources/github/github"
|
2
|
+
|
3
|
+
module Danger
|
4
|
+
# ### CI Setup
|
5
|
+
# You need to edit your `.cirrus.yml` to include `bundle exec danger`.
|
6
|
+
#
|
7
|
+
# Adding this to your `.cirrus.yml` allows Danger to fail your build, both on the Cirrus CI website and within your Pull Request.
|
8
|
+
# With that set up, you can edit your job to add `bundle exec danger` at the build action.
|
9
|
+
#
|
10
|
+
# ### Token Setup
|
11
|
+
class Cirrus < CI
|
12
|
+
def self.validates_as_ci?(env)
|
13
|
+
env.key? "CIRRUS_CI"
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.validates_as_pr?(env)
|
17
|
+
exists = ["CIRRUS_PR", "CIRRUS_REPO_FULL_NAME"].all? { |x| env[x] && !env[x].empty? }
|
18
|
+
exists && env["CIRRUS_PR"].to_i > 0
|
19
|
+
end
|
20
|
+
|
21
|
+
def supported_request_sources
|
22
|
+
@supported_request_sources ||= [Danger::RequestSources::GitHub]
|
23
|
+
end
|
24
|
+
|
25
|
+
def initialize(env)
|
26
|
+
self.repo_slug = env["CIRRUS_REPO_FULL_NAME"]
|
27
|
+
if env["CIRRUS_PR"].to_i > 0
|
28
|
+
self.pull_request_id = env["CIRRUS_BUILD_ID"]
|
29
|
+
end
|
30
|
+
self.repo_url = env["CIRRUS_GIT_CLONE_URL"]
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -47,6 +47,7 @@ module Danger
|
|
47
47
|
# As you own the machine, it's up to you to add the environment variable for the `DANGER_GITLAB_API_TOKEN`.
|
48
48
|
#
|
49
49
|
class Jenkins < CI
|
50
|
+
attr_accessor :project_url
|
50
51
|
class EnvNotFound < StandardError
|
51
52
|
def initialize
|
52
53
|
super("ENV not found, please check your Jenkins. Related: https://stackoverflow.com/search?q=jenkins+env+null")
|
@@ -79,6 +80,7 @@ module Danger
|
|
79
80
|
self.repo_url = self.class.repo_url(env)
|
80
81
|
self.pull_request_id = self.class.pull_request_id(env)
|
81
82
|
self.repo_slug = self.class.repo_slug(self.repo_url)
|
83
|
+
self.project_url = env["CI_MERGE_REQUEST_PROJECT_URL"] || env["CI_PROJECT_URL"]
|
82
84
|
end
|
83
85
|
|
84
86
|
def self.repo_slug(repo_url)
|
data/lib/danger/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.
|
4
|
+
version: 6.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Orta Therox
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-03-
|
12
|
+
date: 2019-03-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: claide
|
@@ -202,6 +202,7 @@ files:
|
|
202
202
|
- lib/danger/ci_source/ci_source.rb
|
203
203
|
- lib/danger/ci_source/circle.rb
|
204
204
|
- lib/danger/ci_source/circle_api.rb
|
205
|
+
- lib/danger/ci_source/cirrus.rb
|
205
206
|
- lib/danger/ci_source/code_build.rb
|
206
207
|
- lib/danger/ci_source/codeship.rb
|
207
208
|
- lib/danger/ci_source/dotci.rb
|