@@ -94,7 +94,7 @@ public Stream<Tag> getTagsStream(Object projectIdOrPath) throws GitLabApiExcepti
9494 * @throws GitLabApiException if any exception occurs
9595 */
9696 public Tag getTag (Object projectIdOrPath , String tagName ) throws GitLabApiException {
97- Response response = get (Response .Status .OK , null , "projects" , getProjectIdOrPath (projectIdOrPath ), "repository" , "tags" , tagName );
97+ Response response = get (Response .Status .OK , null , "projects" , getProjectIdOrPath (projectIdOrPath ), "repository" , "tags" , urlEncode ( tagName ) );
9898 return (response .readEntity (Tag .class ));
9999 }
100100
@@ -198,7 +198,7 @@ public Tag createTag(Object projectIdOrPath, String tagName, String ref, String
198198 */
199199 public void deleteTag (Object projectIdOrPath , String tagName ) throws GitLabApiException {
200200 Response .Status expectedStatus = (isApiVersion (ApiVersion .V3 ) ? Response .Status .OK : Response .Status .NO_CONTENT );
201- delete (expectedStatus , null , "projects" , getProjectIdOrPath (projectIdOrPath ), "repository" , "tags" , tagName );
201+ delete (expectedStatus , null , "projects" , getProjectIdOrPath (projectIdOrPath ), "repository" , "tags" , urlEncode ( tagName ) );
202202 }
203203
204204 /**
@@ -215,7 +215,7 @@ public void deleteTag(Object projectIdOrPath, String tagName) throws GitLabApiEx
215215 public Release createRelease (Object projectIdOrPath , String tagName , String releaseNotes ) throws GitLabApiException {
216216 Form formData = new GitLabApiForm ().withParam ("description" , releaseNotes );
217217 Response response = post (Response .Status .CREATED , formData .asMap (),
218- "projects" , getProjectIdOrPath (projectIdOrPath ), "repository" , "tags" , tagName , "release" );
218+ "projects" , getProjectIdOrPath (projectIdOrPath ), "repository" , "tags" , urlEncode ( tagName ) , "release" );
219219 return (response .readEntity (Release .class ));
220220 }
221221
@@ -233,7 +233,8 @@ public Release createRelease(Object projectIdOrPath, String tagName, String rele
233233 public Release updateRelease (Object projectIdOrPath , String tagName , String releaseNotes ) throws GitLabApiException {
234234 Form formData = new GitLabApiForm ().withParam ("description" , releaseNotes );
235235 Response response = put (Response .Status .OK , formData .asMap (),
236- "projects" , getProjectIdOrPath (projectIdOrPath ), "repository" , "tags" , tagName , "release" );
236+ "projects" , getProjectIdOrPath (projectIdOrPath ), "repository" , "tags" , urlEncode ( tagName ) , "release" );
237237 return (response .readEntity (Release .class ));
238238 }
239+
239240}
0 commit comments