public Tag createTag ( Object projectIdOrPath , String tagName , String ref , String message , String releaseNotes ) throws GitLabApiException { Form formData = new GitLabApiForm ( ) . withParam ( "tag_name" , tagName , true ) . withParam ( "ref" , ref , true ) . withParam ( "message" , message , false ) . withParam ( "release_description" , releaseNotes , false ) ; Response response = post ( Response . Status . CREATED , formData . asMap ( ) , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "repository" , "tags" ) ; return ( response . readEntity ( Tag . class ) ) ; }
Creates a tag on a particular ref of the given project . A message and release notes are optional .