module Gitlab::Client::Tags
Defines methods related to tags. @see docs.gitlab.com/ce/api/tags.html
Public Instance Methods
Source
# File lib/gitlab/client/tags.rb, line 77 def create_release(project, tag, description) post("/projects/#{url_encode project}/repository/tags/#{url_encode tag}/release", body: { description: description }) end
Adds release notes to an existing repository tag. Requires Gitlab
>= 8.2.0
@example
Gitlab.create_release(3, '1.0.0', 'This is ready for production') Gitlab.repo_create_release(5, '1.0.0', 'This is ready for production')
@param [Integer, String] project The ID or name of a project. @param [String] tag The name of the new tag. @param [String] description Release notes with markdown support @return [Gitlab::ObjectifiedHash]
Source
# File lib/gitlab/client/tags.rb, line 34 def create_tag(project, tag_name, ref, message = '', description = nil) post("/projects/#{url_encode project}/repository/tags", body: { tag_name: tag_name, ref: ref, message: message, release_description: description }) end
Creates a new project repository tag.
@example
Gitlab.create_tag(42, 'new_tag', 'master') Gitlab.create_tag(42, 'v1.0', 'master', 'Release 1.0')
@param [Integer, String] project The ID or name of a project. @param [String] tag_name The name of the new tag. @param [String] ref The ref (commit sha, branch name, or another tag) the tag will point to. @param [String] message Optional message for tag, creates annotated tag if specified. @param [String] description Optional release notes for tag. @return [Gitlab::ObjectifiedHash]
Source
# File lib/gitlab/client/tags.rb, line 62 def delete_tag(project, tag) delete("/projects/#{url_encode project}/repository/tags/#{url_encode tag}") end
Deletes a repository tag. Requires Gitlab
>= 6.8.x
@example
Gitlab.delete_tag(3, 'api') Gitlab.repo_delete_tag(5, 'master')
@param [Integer, String] project The ID or name of a project. @param [String] tag The name of the tag to delete @return [Gitlab::ObjectifiedHash]
Source
# File lib/gitlab/client/tags.rb, line 48 def tag(project, tag) get("/projects/#{url_encode project}/repository/tags/#{url_encode tag}") end
Gets information about a repository tag.
@example
Gitlab.tag(3, 'api') Gitlab.repo_tag(5, 'master')
@param [Integer, String] project The ID or name of a project. @param [String] tag The name of the tag. @return [Gitlab::ObjectifiedHash]
Source
# File lib/gitlab/client/tags.rb, line 92 def update_release(project, tag, description) put("/projects/#{url_encode project}/repository/tags/#{url_encode tag}/release", body: { description: description }) end
Updates the release notes of a given release. Requires Gitlab
>= 8.2.0
@example
Gitlab.update_release(3, '1.0.0', 'This is even more ready for production') Gitlab.repo_update_release(5, '1.0.0', 'This is even more ready for production')
@param [Integer, String] project The ID or name of a project. @param [String] tag The name of the new tag. @param [String] description Release notes with markdown support @return [Gitlab::ObjectifiedHash]