Module: Gitlab::Client::Tags
- Included in:
- Gitlab::Client
- Defined in:
- lib/gitlab/client/tags.rb
Overview
Defines methods related to tags.
Instance Method Summary collapse
-
#create_release(project, tag, description) ⇒ Gitlab::ObjectifiedHash
(also: #repo_create_release)
Adds release notes to an existing repository tag.
-
#create_tag(project, tag_name, ref, message = '', description = nil) ⇒ Gitlab::ObjectifiedHash
(also: #repo_create_tag)
Creates a new project repository tag.
-
#delete_tag(project, tag) ⇒ Gitlab::ObjectifiedHash
(also: #repo_delete_tag)
Deletes a repository tag.
-
#tag(project, tag) ⇒ Gitlab::ObjectifiedHash
(also: #repo_tag)
Gets information about a repository tag.
-
#tags(project, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
(also: #repo_tags)
Gets a list of project repository tags.
-
#update_release(project, tag, description) ⇒ Gitlab::ObjectifiedHash
(also: #repo_update_release)
Updates the release notes of a given release.
Instance Method Details
#create_release(project, tag, description) ⇒ Gitlab::ObjectifiedHash Also known as: repo_create_release
Adds release notes to an existing repository tag. Requires Gitlab >= 8.2.0
77 78 79 |
# 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 |
#create_tag(project, tag_name, ref, message = '', description = nil) ⇒ Gitlab::ObjectifiedHash Also known as: repo_create_tag
Creates a new project repository tag.
34 35 36 |
# File 'lib/gitlab/client/tags.rb', line 34 def create_tag(project, tag_name, ref, = '', description = nil) post("/projects/#{url_encode project}/repository/tags", body: { tag_name: tag_name, ref: ref, message: , release_description: description }) end |
#delete_tag(project, tag) ⇒ Gitlab::ObjectifiedHash Also known as: repo_delete_tag
Deletes a repository tag. Requires Gitlab >= 6.8.x
62 63 64 |
# File 'lib/gitlab/client/tags.rb', line 62 def delete_tag(project, tag) delete("/projects/#{url_encode project}/repository/tags/#{url_encode tag}") end |
#tag(project, tag) ⇒ Gitlab::ObjectifiedHash Also known as: repo_tag
Gets information about a repository tag.
48 49 50 |
# File 'lib/gitlab/client/tags.rb', line 48 def tag(project, tag) get("/projects/#{url_encode project}/repository/tags/#{url_encode tag}") end |
#tags(project, options = {}) ⇒ Array<Gitlab::ObjectifiedHash> Also known as:
Gets a list of project repository tags.
17 18 19 |
# File 'lib/gitlab/client/tags.rb', line 17 def (project, = {}) get("/projects/#{url_encode project}/repository/tags", query: ) end |
#update_release(project, tag, description) ⇒ Gitlab::ObjectifiedHash Also known as: repo_update_release
Updates the release notes of a given release. Requires Gitlab >= 8.2.0
92 93 94 |
# 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 |