public GitlabSimpleRepositoryFile updateRepositoryFile ( GitlabProject project , String path , String branchName , String commitMsg , String content ) throws IOException { String tailUrl = GitlabProject . URL + "/" + project . getId ( ) + "/repository/files/" + sanitizePath ( path ) ; GitlabHTTPRequestor requestor = retrieve ( ) . method ( PUT ) ; return requestor . with ( "branch" , branchName ) . with ( "encoding" , "base64" ) . with ( "commit_message" , commitMsg ) . with ( "content" , content ) . to ( tailUrl , GitlabSimpleRepositoryFile . class ) ; }
Updates the content of an existing file in the repository