Skip to content

Commit b3b5d37

Browse files
committed
Encode tag_name in project releases endpoints
Fixes #709
1 parent 2cd2da8 commit b3b5d37

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/gitlab/client/project_releases.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def project_releases(project)
2424
# @param [String] tag_name The tag where the release will be created from..
2525
# @return [Gitlab::ObjectifiedHash] Information about the release
2626
def project_release(project, tag_name)
27-
get("/projects/#{url_encode project}/releases/#{tag_name}")
27+
get("/projects/#{url_encode project}/releases/#{url_encode tag_name}")
2828
end
2929

3030
# Creates a Release. You need push access to the repository to create a Release.
@@ -61,7 +61,7 @@ def create_project_release(project, options = {})
6161
# @option options [String] :description(optional) The description of the release. You can use markdown.
6262
# @return [Gitlab::ObjectifiedHash] Information about the updated release.
6363
def update_project_release(project, tag_name, options = {})
64-
put("/projects/#{url_encode project}/releases/#{tag_name}", body: options)
64+
put("/projects/#{url_encode project}/releases/#{url_encode tag_name}", body: options)
6565
end
6666

6767
# Delete a Release. Deleting a Release will not delete the associated tag.
@@ -73,7 +73,7 @@ def update_project_release(project, tag_name, options = {})
7373
# @param [String] tag_name The tag where the release will be created from.
7474
# @return [Gitlab::ObjectifiedHash] Information about the deleted release.
7575
def delete_project_release(project, tag_name)
76-
delete("/projects/#{url_encode project}/releases/#{tag_name}")
76+
delete("/projects/#{url_encode project}/releases/#{url_encode tag_name}")
7777
end
7878

7979
# Gets Latest Release

0 commit comments

Comments
 (0)