From d8dc7786ca2a8adda01992f91e6f8c3096e4cb50 Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 11 Nov 2015 10:25:24 +0800 Subject: [PATCH] =?UTF-8?q?fork=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/repositories/fork.html.erb | 0 lib/gitlab-cli/lib/gitlab/client/projects.rb | 6 ++++++ 2 files changed, 6 insertions(+) create mode 100644 app/views/repositories/fork.html.erb diff --git a/app/views/repositories/fork.html.erb b/app/views/repositories/fork.html.erb new file mode 100644 index 000000000..e69de29bb diff --git a/lib/gitlab-cli/lib/gitlab/client/projects.rb b/lib/gitlab-cli/lib/gitlab/client/projects.rb index 04ea682aa..476e88b72 100644 --- a/lib/gitlab-cli/lib/gitlab/client/projects.rb +++ b/lib/gitlab-cli/lib/gitlab/client/projects.rb @@ -222,6 +222,12 @@ class Gitlab::Client delete("/projects/#{project}/hooks/#{id}") end + # Forks a project into the user namespace of the authenticated user. + # @param [Integer] - The ID of the project to be forked + def fork(id) + post("/projects/fork/#{id}") + end + # Mark this project as forked from the other # # @example