puppet-community-rangefinder-webhook 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/rangefinder/webhook.rb +10 -4
- data/lib/rangefinder/webhook/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef7ddc103f99dd6467e3eb219847e1a8d5976133ee118b77eea9dc0a30e8c0d1
|
4
|
+
data.tar.gz: 6c0dc61f6c7389722da76f642ed7fde664580486654d67109471d380f4d6a3e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f718c1bb85d95de3f2b564fc4fdbd7f486115b2aa7790499574d81739923adcc9f1947446f0322831f4f34e60a1a17c948381eab52f8acd6f06ae6398408efb8
|
7
|
+
data.tar.gz: 16efde15c4e7280cbcd2375f75c209e8b5f3b1e83c527d0f35c9d82899382136b51b594c35ab3f14139eca24891f6c81c87d7aa4bcffb963654e01e39b0fb94e
|
data/CHANGELOG.md
CHANGED
data/lib/rangefinder/webhook.rb
CHANGED
@@ -71,10 +71,16 @@ class Rangefinder::Webhook < Sinatra::Base
|
|
71
71
|
|
72
72
|
helpers do
|
73
73
|
def scan_for_impact(payload)
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
74
|
+
begin
|
75
|
+
repo = payload.dig('pull_request', 'base', 'repo', 'full_name')
|
76
|
+
idx = payload.dig('pull_request', 'number')
|
77
|
+
files = @installation_client.pull_request_files(repo, idx)
|
78
|
+
paths = files.map {|file| file[:filename] }
|
79
|
+
rescue => e
|
80
|
+
$logger.error "Problem retrieving file list from PR: #{e.message}"
|
81
|
+
$logger.debug e.backtrace.join("\n")
|
82
|
+
return
|
83
|
+
end
|
78
84
|
|
79
85
|
Dir.mktmpdir do |dir|
|
80
86
|
Dir.chdir(dir) do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet-community-rangefinder-webhook
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Ford
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|