Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-09-20 12:51:00 +0300
committerRémy Coutable <remy@rymai.me>2017-09-20 12:51:00 +0300
commitd247841b48c6ad5b3891671e30bedeb409bfad30 (patch)
tree1b90239c8d63574be3df6965f7fcc544fd749221 /app/finders
parent36dc65d5ca34234faf8e79106ed081a28659d899 (diff)
parentc9d40927f877a9d4896edcd94c8525ba8eba3ffd (diff)
Merge branch '20049-projects-api-forks' into 'master'
Resolve "make project data via API report forks of this project" Closes #20049 See merge request gitlab-org/gitlab-ce!14355
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/fork_projects_finder.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/finders/fork_projects_finder.rb b/app/finders/fork_projects_finder.rb
new file mode 100644
index 00000000000..28d1b31868e
--- /dev/null
+++ b/app/finders/fork_projects_finder.rb
@@ -0,0 +1,6 @@
+class ForkProjectsFinder < ProjectsFinder
+ def initialize(project, params: {}, current_user: nil)
+ project_ids = project.forks.includes(:creator).select(:id)
+ super(params: params, current_user: current_user, project_ids_relation: project_ids)
+ end
+end