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:
Diffstat (limited to 'lib/ci/api/forks.rb')
-rw-r--r--lib/ci/api/forks.rb37
1 files changed, 0 insertions, 37 deletions
diff --git a/lib/ci/api/forks.rb b/lib/ci/api/forks.rb
deleted file mode 100644
index 152883a599f..00000000000
--- a/lib/ci/api/forks.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-module Ci
- module API
- class Forks < Grape::API
- resource :forks do
- # Create a fork
- #
- # Parameters:
- # project_id (required) - The ID of a project
- # project_token (requires) - Project token
- # private_token(required) - User private token
- # data (required) - GitLab project data (name_with_namespace, web_url, default_branch, ssh_url_to_repo)
- #
- #
- # Example Request:
- # POST /forks
- post do
- required_attributes! [:project_id, :data, :project_token, :private_token]
- project = Ci::Project.find_by!(gitlab_id: params[:project_id])
- authenticate_project_token!(project)
-
- fork = Ci::CreateProjectService.new.execute(
- current_user,
- params[:data],
- Ci::RoutesHelper.ci_project_url(":project_id"),
- project
- )
-
- if fork
- present fork, with: Entities::Project
- else
- not_found!
- end
- end
- end
- end
- end
-end