public GitlabLabel updateLabel ( Serializable projectId , String name , String newName , String newColor ) throws IOException { String tailUrl = GitlabProject . URL + "/" + sanitizeProjectId ( projectId ) + GitlabLabel . URL ; GitlabHTTPRequestor requestor = retrieve ( ) . method ( PUT ) ; requestor . with ( "name" , name ) ; if ( newName != null ) { requestor . with ( "new_name" , newName ) ; } if ( newColor != null ) { requestor = requestor . with ( "color" , newColor ) ; } return requestor . to ( tailUrl , GitlabLabel . class ) ; }
Updates an existing label .