1616import org .gitlab4j .api .GitLabApi .ApiVersion ;
1717import org .gitlab4j .api .models .Blame ;
1818import org .gitlab4j .api .models .RepositoryFile ;
19+ import org .gitlab4j .api .models .RepositoryFileResponse ;
1920
2021/**
2122 * This class provides an entry point to all the GitLab API repository files calls.
@@ -211,7 +212,7 @@ protected RepositoryFile getFileV3(String filePath, Long projectId, String ref)
211212 * @return a RepositoryFile instance with the created file info
212213 * @throws GitLabApiException if any exception occurs
213214 */
214- public RepositoryFile createFile (Object projectIdOrPath , RepositoryFile file , String branchName , String commitMessage ) throws GitLabApiException {
215+ public RepositoryFileResponse createFile (Object projectIdOrPath , RepositoryFile file , String branchName , String commitMessage ) throws GitLabApiException {
215216
216217 Form formData = createForm (file , branchName , commitMessage );
217218 Response response ;
@@ -223,7 +224,7 @@ public RepositoryFile createFile(Object projectIdOrPath, RepositoryFile file, St
223224 "projects" , getProjectIdOrPath (projectIdOrPath ), "repository" , "files" , urlEncode (file .getFilePath ()));
224225 }
225226
226- return (response .readEntity (RepositoryFile .class ));
227+ return (response .readEntity (RepositoryFileResponse .class ));
227228 }
228229
229230 /**
@@ -246,7 +247,7 @@ public RepositoryFile createFile(Object projectIdOrPath, RepositoryFile file, St
246247 * @deprecated Will be removed in version 6.0, replaced by {@link #createFile(Object, RepositoryFile, String, String)}
247248 */
248249 @ Deprecated
249- public RepositoryFile createFile (RepositoryFile file , Long projectId , String branchName , String commitMessage ) throws GitLabApiException {
250+ public RepositoryFileResponse createFile (RepositoryFile file , Long projectId , String branchName , String commitMessage ) throws GitLabApiException {
250251 return (createFile (projectId , file , branchName , commitMessage ));
251252 }
252253
@@ -268,7 +269,7 @@ public RepositoryFile createFile(RepositoryFile file, Long projectId, String bra
268269 * @return a RepositoryFile instance with the updated file info
269270 * @throws GitLabApiException if any exception occurs
270271 */
271- public RepositoryFile updateFile (Object projectIdOrPath , RepositoryFile file , String branchName , String commitMessage ) throws GitLabApiException {
272+ public RepositoryFileResponse updateFile (Object projectIdOrPath , RepositoryFile file , String branchName , String commitMessage ) throws GitLabApiException {
272273
273274 Form formData = createForm (file , branchName , commitMessage );
274275 Response response ;
@@ -280,7 +281,7 @@ public RepositoryFile updateFile(Object projectIdOrPath, RepositoryFile file, St
280281 "projects" , getProjectIdOrPath (projectIdOrPath ), "repository" , "files" , urlEncode (file .getFilePath ()));
281282 }
282283
283- return (response .readEntity (RepositoryFile .class ));
284+ return (response .readEntity (RepositoryFileResponse .class ));
284285 }
285286
286287 /**
@@ -303,7 +304,7 @@ public RepositoryFile updateFile(Object projectIdOrPath, RepositoryFile file, St
303304 * @deprecated Will be removed in version 6.0, replaced by {@link #updateFile(Object, RepositoryFile, String, String)}
304305 */
305306 @ Deprecated
306- public RepositoryFile updateFile (RepositoryFile file , Long projectId , String branchName , String commitMessage ) throws GitLabApiException {
307+ public RepositoryFileResponse updateFile (RepositoryFile file , Long projectId , String branchName , String commitMessage ) throws GitLabApiException {
307308 return (updateFile (projectId , file , branchName , commitMessage ));
308309 }
309310
0 commit comments