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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 035ce582ea667e60dfda80d1c6c3292c17d7f384
4
- data.tar.gz: faa2bacbc0e417f69e21b6fcf3e301f0789c90f5
3
+ metadata.gz: a3969d079a0bc7fa36bf0bbd34507fc30f10905a
4
+ data.tar.gz: c6145bb55ca215eb2025461e631b2ff2227ad6bf
5
5
  SHA512:
6
- metadata.gz: e139a3aa585b191a0d2959e4565a56626b5d66c11f03926c5c1ee91625d28a085309b4491aa489a1d9b220de8220af534cfc0f4481d13fa0a68a48f1059f4d30
7
- data.tar.gz: 945bd0fecf7c392b19ce7928ea76938e862c540121f771accc791ad60fcc8722b3c18d4a287f5bcfb7500d9ec5dd5c9d52b5d7ae9dd91cb32029c9be7dc3df82
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)
@@ -1,4 +1,4 @@
1
1
  module Danger
2
- VERSION = "5.5.0".freeze
2
+ VERSION = "5.5.1".freeze
3
3
  DESCRIPTION = "Like Unit Tests, but for your Team Culture.".freeze
4
4
  end
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.0
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-26 00:00:00.000000000 Z
12
+ date: 2017-09-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: claide