danger 5.7.1 → 5.8.0
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/appveyor.rb +60 -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: a72490b3f9bf6128a0ce28f1b3c3c95937b6885798b4714bd143039d190e0a68
|
4
|
+
data.tar.gz: 82b296a25e0c8677c75a65acb825aaa870f15bd036c14b193ea4171d9ee00c0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a2b4e8dd96a9e6d7e546c986dc4dd843c6395baa90326c890af7f2e138c557ac1da39d3288818560179622d7f93a8114d76853b6edc5c9974473afae6d8bb25
|
7
|
+
data.tar.gz: 5fc7e35ef9d4efd480cef4ef66285d8b5f323a7ff06efaf9c56930d1c2c574e59a2a665bd485c05e8674fff345738d0bde05c81b27ba868bbc6872704ca74f21
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# https://www.appveyor.com/docs/build-configuration/
|
2
|
+
module Danger
|
3
|
+
# ### CI Setup
|
4
|
+
#
|
5
|
+
# Install dependencies and add a danger step to your `appveyor.yml`.
|
6
|
+
# ```yaml
|
7
|
+
# install:
|
8
|
+
# - cmd: >-
|
9
|
+
# set PATH=C:\Ruby25-x64\bin;%PATH%
|
10
|
+
#
|
11
|
+
# bundle install
|
12
|
+
# after_test:
|
13
|
+
# - cmd: >-
|
14
|
+
# bundle exec danger
|
15
|
+
# ```
|
16
|
+
#
|
17
|
+
# ### Token Setup
|
18
|
+
#
|
19
|
+
# For public repositories, add your plain token to environment variables in `appveyor.yml`.
|
20
|
+
# Encrypted environment variables will not be decrypted on PR builds.
|
21
|
+
# see here: https://www.appveyor.com/docs/build-configuration/#secure-variables
|
22
|
+
# ```yaml
|
23
|
+
# environment:
|
24
|
+
# DANGER_GITHUB_API_TOKEN: <YOUR_TOKEN_HERE>
|
25
|
+
# ```
|
26
|
+
#
|
27
|
+
# For private repositories, enter your token in `Settings>Environment>Environment variables>Add variable` and turn on `variable encryption`.
|
28
|
+
# You will see encrypted variable text in `Settings>Export YAML` so just copy to your `appveyor.yml`.
|
29
|
+
# ```yaml
|
30
|
+
# environment:
|
31
|
+
# DANGER_GITHUB_API_TOKEN:
|
32
|
+
# secure: <YOUR_ENCRYPTED_TOKEN_HERE>
|
33
|
+
# ```
|
34
|
+
#
|
35
|
+
class AppVeyor < CI
|
36
|
+
def self.validates_as_ci?(env)
|
37
|
+
env.key? "APPVEYOR"
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.validates_as_pr?(env)
|
41
|
+
return false unless env.key? "APPVEYOR_PULL_REQUEST_NUMBER"
|
42
|
+
env["APPVEYOR_PULL_REQUEST_NUMBER"].to_i > 0
|
43
|
+
end
|
44
|
+
|
45
|
+
def initialize(env)
|
46
|
+
self.repo_slug = env["APPVEYOR_REPO_NAME"]
|
47
|
+
self.pull_request_id = env["APPVEYOR_PULL_REQUEST_NUMBER"]
|
48
|
+
self.repo_url = GitRepo.new.origins # AppVeyor doesn't provide a repo url env variable for now
|
49
|
+
end
|
50
|
+
|
51
|
+
def supported_request_sources
|
52
|
+
@supported_request_sources ||= [
|
53
|
+
Danger::RequestSources::GitHub,
|
54
|
+
Danger::RequestSources::BitbucketCloud,
|
55
|
+
Danger::RequestSources::BitbucketServer,
|
56
|
+
Danger::RequestSources::GitLab
|
57
|
+
]
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
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.
|
4
|
+
version: 5.8.0
|
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-
|
12
|
+
date: 2018-11-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: claide
|
@@ -179,6 +179,7 @@ files:
|
|
179
179
|
- bin/danger
|
180
180
|
- lib/assets/DangerfileTemplate
|
181
181
|
- lib/danger.rb
|
182
|
+
- lib/danger/ci_source/appveyor.rb
|
182
183
|
- lib/danger/ci_source/bitrise.rb
|
183
184
|
- lib/danger/ci_source/buddybuild.rb
|
184
185
|
- lib/danger/ci_source/buildkite.rb
|