Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6e515cdd
Commit
6e515cdd
authored
Jan 04, 2021
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve code-quality in Queries.find
parent
0f7c3b70
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
lib/gitlab/graphql/queries.rb
lib/gitlab/graphql/queries.rb
+7
-5
No files found.
lib/gitlab/graphql/queries.rb
View file @
6e515cdd
...
@@ -164,11 +164,7 @@ module Gitlab
...
@@ -164,11 +164,7 @@ module Gitlab
definitions
=
[]
definitions
=
[]
::
Find
.
find
(
root
.
to_s
)
do
|
path
|
::
Find
.
find
(
root
.
to_s
)
do
|
path
|
next
unless
path
.
ends_with?
(
'.graphql'
)
definitions
<<
Definition
.
new
(
path
,
fragments
)
if
query?
(
path
)
next
if
path
.
ends_with?
(
'.fragment.graphql'
)
next
if
path
.
ends_with?
(
'typedefs.graphql'
)
definitions
<<
Definition
.
new
(
path
,
fragments
)
end
end
definitions
definitions
...
@@ -191,6 +187,12 @@ module Gitlab
...
@@ -191,6 +187,12 @@ module Gitlab
@known_failures
.
fetch
(
'filenames'
,
[]).
any?
{
|
known_failure
|
path
.
to_s
.
ends_with?
(
known_failure
)
}
@known_failures
.
fetch
(
'filenames'
,
[]).
any?
{
|
known_failure
|
path
.
to_s
.
ends_with?
(
known_failure
)
}
end
end
def
self
.
query?
(
path
)
path
.
ends_with?
(
'.graphql'
)
&&
!
path
.
ends_with?
(
'.fragment.graphql'
)
&&
!
path
.
ends_with?
(
'typedefs.graphql'
)
end
end
end
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment