public Project forkProject ( Object projectIdOrPath , String namespace ) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm ( ) . withParam ( "namespace" , namespace , true ) ; Response . Status expectedStatus = ( isApiVersion ( ApiVersion . V3 ) ? Response . Status . OK : Response . Status . CREATED ) ; Response response = post ( expectedStatus , formData , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "fork" ) ; return ( response . readEntity ( Project . class ) ) ; }
Forks a project into the user namespace of the authenticated user or the one provided . The forking operation for a project is asynchronous and is completed in a background job . The request will return immediately .