danger 5.5.0 → 5.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/danger/ci_source/bitrise.rb +1 -2
- data/lib/danger/ci_source/circle.rb +2 -1
- data/lib/danger/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3969d079a0bc7fa36bf0bbd34507fc30f10905a
|
4
|
+
data.tar.gz: c6145bb55ca215eb2025461e631b2ff2227ad6bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bc5b3443fcf563e37e889c624ba6cced9b8f932c066ad13703df308015dcd4391a57aba1970e10a7631b3b71e550e5163a23beeea54cee3d7a56d1faeec5383
|
7
|
+
data.tar.gz: f9e6ef5df4f3e927489c06c1c442273c1708e9be4889060889f5314a6941b21522f2372f9371a5dc956babeb98655ed647e46ef58e7ad3e3543a643813de971e
|
@@ -17,8 +17,7 @@ module Danger
|
|
17
17
|
#
|
18
18
|
# ### Token Setup
|
19
19
|
#
|
20
|
-
# Add the `DANGER_GITHUB_API_TOKEN` to your workflow's App Env Vars.
|
21
|
-
# Warning: adding the token as a Secret Env Var will not work for PR builds, as [Bitrise does not expose secret vars to PRs](https://bitrise.uservoice.com/forums/235233-general/suggestions/11701587-make-secret-env-variables-available-for-prs-from-t).
|
20
|
+
# Add the `DANGER_GITHUB_API_TOKEN` to your workflow's [Secret App Env Vars](https://blog.bitrise.io/anyone-even-prs-can-have-secrets).
|
22
21
|
#
|
23
22
|
class Bitrise < CI
|
24
23
|
def self.validates_as_ci?(env)
|
@@ -42,6 +42,7 @@ module Danger
|
|
42
42
|
def self.validates_as_pr?(env)
|
43
43
|
# This will get used if it's available, instead of the API faffing.
|
44
44
|
return true if env["CI_PULL_REQUEST"] && !env["CI_PULL_REQUEST"].empty?
|
45
|
+
return true if env["CIRCLE_PULL_REQUEST"] && !env["CIRCLE_PULL_REQUEST"].empty?
|
45
46
|
|
46
47
|
# Real-world talk, it should be worrying if none of these are in the environment
|
47
48
|
return false unless ["CIRCLE_CI_API_TOKEN", "CIRCLE_PROJECT_USERNAME", "CIRCLE_PROJECT_REPONAME", "CIRCLE_BUILD_NUM"].all? { |x| env[x] && !env[x].empty? }
|
@@ -57,7 +58,7 @@ module Danger
|
|
57
58
|
|
58
59
|
def initialize(env)
|
59
60
|
self.repo_url = env["CIRCLE_REPOSITORY_URL"]
|
60
|
-
pr_url = env["CI_PULL_REQUEST"]
|
61
|
+
pr_url = env["CI_PULL_REQUEST"] || env["CIRCLE_PULL_REQUEST"]
|
61
62
|
|
62
63
|
# If it's not a real URL, use the Circle API
|
63
64
|
unless pr_url && URI.parse(pr_url).kind_of?(URI::HTTP)
|
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: 5.5.
|
4
|
+
version: 5.5.1
|
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: 2017-09-
|
12
|
+
date: 2017-09-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: claide
|