BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
20c2e902
Unverified
Commit
20c2e902
authored
Sep 02, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor finders. Prevent circular dependency error
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
9ccef9a7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
7 deletions
+9
-7
issuable_finder.rb
app/finders/issuable_finder.rb
+4
-2
issues_finder.rb
app/finders/issues_finder.rb
+1
-1
merge_requests_finder.rb
app/finders/merge_requests_finder.rb
+1
-1
issues.rb
lib/api/issues.rb
+3
-3
No files found.
app/finders/
bas
e_finder.rb
→
app/finders/
issuabl
e_finder.rb
View file @
20c2e902
#
Bas
eFinder
#
Issuabl
eFinder
#
# Used to filter Issues and MergeRequests collections by set of params
#
...
...
@@ -16,7 +16,9 @@
# label_name: string
# sort: string
#
class
BaseFinder
require_relative
'projects_finder'
class
IssuableFinder
attr_accessor
:current_user
,
:params
def
execute
(
current_user
,
params
)
...
...
app/finders/issues_finder.rb
View file @
20c2e902
...
...
@@ -15,7 +15,7 @@
# label_name: string
# sort: string
#
class
IssuesFinder
<
Bas
eFinder
class
IssuesFinder
<
Issuabl
eFinder
def
klass
Issue
end
...
...
app/finders/merge_requests_finder.rb
View file @
20c2e902
...
...
@@ -15,7 +15,7 @@
# label_name: string
# sort: string
#
class
MergeRequestsFinder
<
Bas
eFinder
class
MergeRequestsFinder
<
Issuabl
eFinder
def
klass
MergeRequest
end
...
...
lib/api/issues.rb
View file @
20c2e902
...
...
@@ -6,9 +6,9 @@ module API
helpers
do
def
filter_issues_state
(
issues
,
state
=
nil
)
case
state
when
'opened'
then
issues
.
opened
when
'closed'
then
issues
.
closed
else
issues
when
'opened'
then
issues
.
opened
when
'closed'
then
issues
.
closed
else
issues
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