danger 5.6.2 → 5.6.3

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: 45357cabce688cc7b1ac64730fc38dbc56ee6fb2
4
- data.tar.gz: 319ce3e1b1909f7d32f2bdfee39c0223500cfa3f
3
+ metadata.gz: 3008daee867afc587ebc2d20fc53ec3142c0cf70
4
+ data.tar.gz: e87af55a0ad856a1879147de8509ac3f0b979686
5
5
  SHA512:
6
- metadata.gz: 10d0fc66cbd4f3c4d734497522902d3030df5a9eeca111913d78bd9e63dba0b4f7d8fcc46e56691a4429b575914029747b79299a1dff239cedc0cb39d0564ded
7
- data.tar.gz: 7b5f1b4473035185ea880a83e67f61e66d2fc8f702069a0f31b8301cf6b8b719e1e1594f3b4cc68a05ee5e72c82de6324c6985c29923309315a9816ca76d4a5a
6
+ metadata.gz: 21bbc591a92443cfc5f1819ada02985e291878bdf33fd34d3532fb860301a4a9a538a0f2afac3a51bf6d08a823bf293f9c8c9acc28559dbb54325bf7b2d2d34a
7
+ data.tar.gz: 5fc46f0a928bfcf83a0bc069a05eff38d22b14c5e3a3a526e47d9d88968b33be9922faee91bcfd4e1cafb47286982492765b373e3e469c81ce199ca0ba2cce47
@@ -16,8 +16,13 @@ module Danger
16
16
 
17
17
  if url.nil? && !env["CIRCLE_PROJECT_USERNAME"].nil? && !env["CIRCLE_PROJECT_REPONAME"].nil?
18
18
  repo_slug = env["CIRCLE_PROJECT_USERNAME"] + "/" + env["CIRCLE_PROJECT_REPONAME"]
19
- token = env["DANGER_CIRCLE_CI_API_TOKEN"]
20
- url = fetch_pull_request_url(repo_slug, env["CIRCLE_BUILD_NUM"], token)
19
+ if !env["CIRCLE_PR_NUMBER"].nil?
20
+ host = env["DANGER_GITHUB_HOST"] || "github.com"
21
+ url = "https://" + host + "/" + repo_slug + "/pull/" + env["CIRCLE_PR_NUMBER"]
22
+ else
23
+ token = env["DANGER_CIRCLE_CI_API_TOKEN"]
24
+ url = fetch_pull_request_url(repo_slug, env["CIRCLE_BUILD_NUM"], token)
25
+ end
21
26
  end
22
27
  url
23
28
  end
@@ -3,7 +3,8 @@ require "danger/ci_source/support/repo_info"
3
3
  module Danger
4
4
  class FindRepoInfoFromURL
5
5
  REGEXP = %r{
6
- (?<slug>[^/]+/[^/]+)
6
+ ://[^/]+/
7
+ (?<slug>[^/]+(/[^/]+){1,2})
7
8
  (/(pull|merge_requests|pull-requests)/)
8
9
  (?<id>\d+)
9
10
  }x
@@ -1,4 +1,4 @@
1
1
  module Danger
2
- VERSION = "5.6.2".freeze
2
+ VERSION = "5.6.3".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.6.2
4
+ version: 5.6.3
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: 2018-05-31 00:00:00.000000000 Z
12
+ date: 2018-07-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: claide