@@ -1339,16 +1339,30 @@ public GitlabProject createUserProject(Integer userId, String name, String descr
1339
1339
/**
1340
1340
* @param namespace The namespace of the fork
1341
1341
* @param projectId ProjectId of the project forked
1342
+ * @param path The path that will be assigned to the resultant project after forking. (Optional)
1343
+ * @param name The name that will be assigned to the resultant project after forking. (Optional)
1342
1344
* @return The new Gitlab Project
1343
1345
* @throws IOException on gitlab api call error
1344
1346
*/
1345
- public GitlabProject createFork (String namespace , Integer projectId ) throws IOException {
1347
+ public GitlabProject createFork (String namespace , Integer projectId , String path , String name ) throws IOException {
1346
1348
Query query = new Query ()
1347
- .appendIf ("namespace" , namespace );
1349
+ .appendIf ("namespace" , namespace )
1350
+ .appendIf ("path" , path )
1351
+ .appendIf ("name" , name );
1348
1352
String tailUrl = GitlabProject .URL + "/" + projectId + "/fork" + query .toString ();
1349
1353
return dispatch ().to (tailUrl , GitlabProject .class );
1350
1354
}
1351
1355
1356
+ /**
1357
+ * @param namespace The namespace of the fork
1358
+ * @param projectId ProjectId of the project forked
1359
+ * @return The new Gitlab Project
1360
+ * @throws IOException on gitlab api call error
1361
+ */
1362
+ public GitlabProject createFork (String namespace , Integer projectId ) throws IOException {
1363
+ return createFork (namespace , projectId , null , null );
1364
+ }
1365
+
1352
1366
/**
1353
1367
* @param namespace The namespace of the fork
1354
1368
* @param gitlabProject The project forked
0 commit comments