Module: Gitlab::Client::ProtectedTags
- Included in:
- Gitlab::Client
- Defined in:
- lib/gitlab/client/protected_tags.rb
Overview
Defines methods related to Protected Tags.
Instance Method Summary collapse
-
#protect_repository_tag(project, name, options = {}) ⇒ Gitlab::ObjectifiedHash
Protects a single repository tag or several project repository tags using a wildcard protected tag.
-
#protected_tag(project, name) ⇒ Gitlab::ObjectifiedHash
Gets a single protected tag or wildcard protected tag.
-
#protected_tags(project, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of protected tags from a project.
-
#unprotect_repository_tag(project, name) ⇒ nil
Unprotects the given protected tag or wildcard protected tag.
Instance Method Details
#protect_repository_tag(project, name, options = {}) ⇒ Gitlab::ObjectifiedHash
Protects a single repository tag or several project repository tags using a wildcard protected tag.
42 43 44 45 |
# File 'lib/gitlab/client/protected_tags.rb', line 42 def protect_repository_tag(project, name, = {}) body = { name: name }.merge() post("/projects/#{url_encode project}/protected_tags", body: body) end |
#protected_tag(project, name) ⇒ Gitlab::ObjectifiedHash
Gets a single protected tag or wildcard protected tag.
28 29 30 |
# File 'lib/gitlab/client/protected_tags.rb', line 28 def protected_tag(project, name) get("/projects/#{url_encode project}/protected_tags/#{name}") end |
#protected_tags(project, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of protected tags from a project
16 17 18 |
# File 'lib/gitlab/client/protected_tags.rb', line 16 def (project, = {}) get("/projects/#{url_encode project}/protected_tags", query: ) end |
#unprotect_repository_tag(project, name) ⇒ nil
Unprotects the given protected tag or wildcard protected tag.
55 56 57 |
# File 'lib/gitlab/client/protected_tags.rb', line 55 def unprotect_repository_tag(project, name) delete("/projects/#{url_encode project}/protected_tags/#{name}") end |