reagan 0.7.0 → 0.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/change.rb +4 -2
- data/reagan.gemspec +1 -1
- data/reagan.yml.EXAMPLE +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa82dc3e27d070c5d66ca40b4088d68b21a9ca3d
|
4
|
+
data.tar.gz: d2c7fb3484aff6e8ab84f25a3271d061c75e1d25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc48ac3f3659ae8d49a87f3dec1293d67bc183d9658ea6119a3b40eebab5456ffdbc79b73ecd44a00be10c8a283c825a71b130db1dc50db767f3f62c27362ad3
|
7
|
+
data.tar.gz: 033de188750db73a5881192a6b52bd9cc4fc386c0af37f168f0d58794d8c3391894bd8ac3dc0327a674e86cbf816f7e610968ddabd2d25d9bc9193ec32b5d360
|
data/lib/change.rb
CHANGED
@@ -77,6 +77,8 @@ module Reagan
|
|
77
77
|
|
78
78
|
# queries github for the files that have changed
|
79
79
|
def query_gh(pull_num)
|
80
|
+
Octokit.auto_paginate = true # avoids issues with large commits
|
81
|
+
Octokit.api_endpoint = @config['github']['api_endpoint'] || 'https://api.github.com'
|
80
82
|
gh = Octokit::Client.new(:access_token => @config['github']['auth_token'])
|
81
83
|
files_from_pull(gh.pull_request_files(@config ['github']['repo'], pull_num))
|
82
84
|
end
|
@@ -92,7 +94,7 @@ module Reagan
|
|
92
94
|
|
93
95
|
# check to see if the file exists in the workspace so we don't test deleted objects
|
94
96
|
def object_still_exists(file)
|
95
|
-
::File.exist?(::File.join(@config['jenkins']['workspace_dir'],file))
|
97
|
+
::File.exist?(::File.join(@config['jenkins']['workspace_dir'], file))
|
96
98
|
end
|
97
99
|
|
98
100
|
# builds a hash of files / cookbooks that changed based on the pull data from GH
|
@@ -105,7 +107,7 @@ module Reagan
|
|
105
107
|
files['environments'] << file && next if file.match('^environments') && object_still_exists(file)
|
106
108
|
files['roles'] << file && next if file.match('^roles') && object_still_exists(file)
|
107
109
|
files['data_bags'] << file && next if file.match('^data_bags') && object_still_exists(file)
|
108
|
-
cookbooks << file.split('/')[1] if
|
110
|
+
cookbooks << file.split('/')[1] if file.match('^cookbooks') && object_still_exists(::File.join('cookbooks/', file.split('/')[1]))
|
109
111
|
end
|
110
112
|
# set cookbooks array to set to dedupe list of cookbooks
|
111
113
|
files['cookbooks'] = cookbooks.to_set
|
data/reagan.gemspec
CHANGED
data/reagan.yml.EXAMPLE
CHANGED