Module: Gitlab::Client::ProjectReleases
- Included in:
- Gitlab::Client
- Defined in:
- lib/gitlab/client/project_releases.rb
Overview
Defines methods related to project releases.
Instance Method Summary collapse
-
#create_project_release(project, options = {}) ⇒ Gitlab::ObjectifiedHash
Creates a Release.
-
#delete_project_release(project, tag_name) ⇒ Gitlab::ObjectifiedHash
Delete a Release.
-
#project_release(project, tag_name) ⇒ Gitlab::ObjectifiedHash
Gets a Release by a tag name.
-
#project_releases(project) ⇒ Array<Gitlab::ObjectifiedHash>
Returns Paginated list of a project’s releases, sorted by created_at.
-
#update_project_release(project, tag_name, options = {}) ⇒ Gitlab::ObjectifiedHash
Updates a release.
Instance Method Details
#create_project_release(project, options = {}) ⇒ Gitlab::ObjectifiedHash
Creates a Release. You need push access to the repository to create a Release.
48 49 50 |
# File 'lib/gitlab/client/project_releases.rb', line 48 def create_project_release(project, = {}) post("/projects/#{url_encode project}/releases", body: ) end |
#delete_project_release(project, tag_name) ⇒ Gitlab::ObjectifiedHash
Delete a Release. Deleting a Release will not delete the associated tag.
75 76 77 |
# File 'lib/gitlab/client/project_releases.rb', line 75 def delete_project_release(project, tag_name) delete("/projects/#{url_encode project}/releases/#{tag_name}") end |
#project_release(project, tag_name) ⇒ Gitlab::ObjectifiedHash
Gets a Release by a tag name
26 27 28 |
# File 'lib/gitlab/client/project_releases.rb', line 26 def project_release(project, tag_name) get("/projects/#{url_encode project}/releases/#{tag_name}") end |
#project_releases(project) ⇒ Array<Gitlab::ObjectifiedHash>
Returns Paginated list of a project’s releases, sorted by created_at.
14 15 16 |
# File 'lib/gitlab/client/project_releases.rb', line 14 def project_releases(project) get("/projects/#{url_encode project}/releases") end |
#update_project_release(project, tag_name, options = {}) ⇒ Gitlab::ObjectifiedHash
Updates a release.
63 64 65 |
# File 'lib/gitlab/client/project_releases.rb', line 63 def update_project_release(project, tag_name, = {}) put("/projects/#{url_encode project}/releases/#{tag_name}", body: ) end |