gitlab-triage 1.14.0 → 1.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab/CODEOWNERS +1 -1
- data/lib/gitlab/triage/engine.rb +3 -1
- data/lib/gitlab/triage/graphql_queries/query_builder.rb +7 -1
- data/lib/gitlab/triage/graphql_queries/threads_query.rb +2 -2
- data/lib/gitlab/triage/graphql_queries/user_notes_query.rb +2 -2
- data/lib/gitlab/triage/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: fbce3d75b063c517b80bbbfa5a0cf8ef2cf0f6ffe9eabcebe743f7ea5e6fbc23
|
4
|
+
data.tar.gz: '09687c2d578d80f351a54a614113bcf36b70a15144f848409b8143be53c95f9b'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f88d9507fd36e15941fa9b1345887e138893e8e7e5ae1b872408cfea449c2565c48c4267c1df278fa0f1ddf3f1c857050e4868eef88268b4acf9c7078dda0a53
|
7
|
+
data.tar.gz: 77dfd58b8e61d3115e9057b688d7f2b91b8473dd4e7a177a32cad0585f1f42c115d371f9d10f10a0a27fd3ee1b4230ee757982dcc85207395ebef82274165e70
|
data/.gitlab/CODEOWNERS
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
# The official maintainers
|
2
|
-
* @rymai @godfat @markglenfletcher
|
2
|
+
* @rymai @godfat-gitlab @markglenfletcher
|
data/lib/gitlab/triage/engine.rb
CHANGED
@@ -174,8 +174,10 @@ module Gitlab
|
|
174
174
|
# retrieving the resources for every rule is inefficient
|
175
175
|
# however, previous rules may affect those upcoming
|
176
176
|
resources = network.query_api(build_get_url(resource_type, conditions))
|
177
|
+
iids = resources.pluck('iid').map(&:to_s)
|
178
|
+
|
177
179
|
graphql_query = build_graphql_query(resource_type, conditions)
|
178
|
-
graphql_resources = graphql_network.query(graphql_query, source: options.source_id) if graphql_query.present?
|
180
|
+
graphql_resources = graphql_network.query(graphql_query, source: options.source_id, iids: iids) if graphql_query.present?
|
179
181
|
# In some filters/actions we want to know which resource type it is
|
180
182
|
attach_resource_type(resources, resource_type)
|
181
183
|
decorate_resources_with_graphql_data(resources, graphql_resources)
|
@@ -18,7 +18,7 @@ module Gitlab
|
|
18
18
|
def query
|
19
19
|
return if query_template.nil?
|
20
20
|
|
21
|
-
format(query_template, source_type: source_type, resource_type: resource_type.to_s.camelize(:lower))
|
21
|
+
format(query_template, source_type: source_type, resource_type: resource_type.to_s.camelize(:lower), group_query: group_query)
|
22
22
|
end
|
23
23
|
|
24
24
|
delegate :present?, to: :query_template
|
@@ -35,6 +35,12 @@ module Gitlab
|
|
35
35
|
ThreadsQuery
|
36
36
|
end
|
37
37
|
end
|
38
|
+
|
39
|
+
def group_query
|
40
|
+
return if source_type != 'group'
|
41
|
+
|
42
|
+
', includeSubgroups: true'
|
43
|
+
end
|
38
44
|
end
|
39
45
|
end
|
40
46
|
end
|
@@ -2,10 +2,10 @@ module Gitlab
|
|
2
2
|
module Triage
|
3
3
|
module GraphqlQueries
|
4
4
|
ThreadsQuery = <<-GRAPHQL.freeze # rubocop:disable Naming/ConstantName
|
5
|
-
query($source: ID!, $after: String) {
|
5
|
+
query($source: ID!, $after: String, $iids: [String!]) {
|
6
6
|
%{source_type}(fullPath: $source) {
|
7
7
|
id
|
8
|
-
%{resource_type}(after: $after) {
|
8
|
+
%{resource_type}(after: $after, iids: $iids%{group_query}) {
|
9
9
|
pageInfo {
|
10
10
|
hasNextPage
|
11
11
|
endCursor
|
@@ -2,10 +2,10 @@ module Gitlab
|
|
2
2
|
module Triage
|
3
3
|
module GraphqlQueries
|
4
4
|
UserNotesQuery = <<-GRAPHQL.freeze # rubocop:disable Naming/ConstantName
|
5
|
-
query($source: ID!, $after: String) {
|
5
|
+
query($source: ID!, $after: String, $iids: [String!]) {
|
6
6
|
%{source_type}(fullPath: $source) {
|
7
7
|
id
|
8
|
-
%{resource_type}(after: $after) {
|
8
|
+
%{resource_type}(after: $after, iids: $iids%{group_query}) {
|
9
9
|
pageInfo {
|
10
10
|
hasNextPage
|
11
11
|
endCursor
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-triage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.14.
|
4
|
+
version: 1.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitLab
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-10-
|
11
|
+
date: 2020-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|