@@ -1124,7 +1124,7 @@ public Variable updateVariable(Object groupIdOrPath, String key, String value, B
11241124 /**
11251125 * Deletes a group variable.
11261126 *
1127- * <pre><code>DELETE /groups/:id/variables/:key</code></pre>
1127+ * <pre><code>GitLab Endpoint: DELETE /groups/:id/variables/:key</code></pre>
11281128 *
11291129 * @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path, required
11301130 * @param key the key of an existing variable, required
@@ -1133,4 +1133,20 @@ public Variable updateVariable(Object groupIdOrPath, String key, String value, B
11331133 public void deleteVariable (Object groupIdOrPath , String key ) throws GitLabApiException {
11341134 delete (Response .Status .NO_CONTENT , null , "groups" , getGroupIdOrPath (groupIdOrPath ), "variables" , key );
11351135 }
1136+
1137+ /**
1138+ * Transfer a project to the Group namespace. Available only for admin users.
1139+ *
1140+ * <pre><code>GitLab Endpoint: POST /groups/:id/projects/:project_id</code></pre>
1141+ *
1142+ * @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path, required
1143+ * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
1144+ * @return the transfered Project instance
1145+ * @throws GitLabApiException if any exception occurs during execution
1146+ */
1147+ public Project transferProject (Object groupIdOrPath , Object projectIdOrPath ) throws GitLabApiException {
1148+ Response response = post (Response .Status .CREATED , (Form )null , "groups" , getGroupIdOrPath (groupIdOrPath ),
1149+ "projects" , getProjectIdOrPath (projectIdOrPath ));
1150+ return (response .readEntity (Project .class ));
1151+ }
11361152}
0 commit comments