danger-reviewer 0.0.2.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/reviewer/gem_version.rb +1 -1
- data/lib/reviewer/github.rb +10 -1
- data/lib/reviewer/plugin.rb +4 -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: 9c086304da503565e7523ba4fd203c7dbffd58d9ca46b04eee2c9fc87e98818c
|
4
|
+
data.tar.gz: 2c2c3913f9a401f4de921977e2945bdc7780bea9df79d3bc02aaf9da557c0ae7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f946629afb02b2508f770abb971af05cd1ff4a4fcc4e92b8c103bd4edae8a9ed50bf8cbdc16b5e5deb1735dac3e6e5388287eac93a8861e7bb28b1040e346f5
|
7
|
+
data.tar.gz: b4f95a32ac94b35158f4da8de3a6eb94939d78e9e8e80c1d13a05a624f75417d0f02f9fd503dfe4bf9cbb95e8535bb745b94456575e077e5b23e653d2710cd07
|
data/lib/reviewer/gem_version.rb
CHANGED
data/lib/reviewer/github.rb
CHANGED
@@ -64,7 +64,7 @@ module GitHub
|
|
64
64
|
GRAPHQL
|
65
65
|
|
66
66
|
ReviewerQuery = GitHub::Client.parse <<-'GRAPHQL'
|
67
|
-
query($owner:String!, $repo:String!, $number:Int!) {
|
67
|
+
query ($owner: String!, $repo: String!, $number: Int!) {
|
68
68
|
repository(name: $repo, owner: $owner) {
|
69
69
|
pullRequest(number: $number) {
|
70
70
|
reviewRequests(first: 10) {
|
@@ -76,6 +76,15 @@ module GitHub
|
|
76
76
|
}
|
77
77
|
}
|
78
78
|
}
|
79
|
+
reviews(first: 10) {
|
80
|
+
edges {
|
81
|
+
node {
|
82
|
+
author {
|
83
|
+
login
|
84
|
+
}
|
85
|
+
}
|
86
|
+
}
|
87
|
+
}
|
79
88
|
}
|
80
89
|
}
|
81
90
|
}
|
data/lib/reviewer/plugin.rb
CHANGED
@@ -73,7 +73,10 @@ module Danger
|
|
73
73
|
owner, repo = env.ci_source.repo_slug.split('/')
|
74
74
|
|
75
75
|
result = GitHub::Client.query(GitHub::ReviewerQuery, variables: { repo: repo, owner: owner, number: github.pr_json[:number] })
|
76
|
-
|
76
|
+
[
|
77
|
+
result.data.repository.pull_request.review_requests.edges.map { |edge| edge.node.reviewer.login },
|
78
|
+
result.data.repository.pull_request.reviews.edges.map { |edge| edge.node.author.login },
|
79
|
+
].flatten.uniq
|
77
80
|
end
|
78
81
|
|
79
82
|
def team_members(team)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-reviewer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikko Kokkonen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: danger-plugin-api
|