Class: Gitlab::Release::Manager
- Defined in:
- lib/gitlab/release/manager.rb
Overview
This class contains some tools to finish a release.
Instance Method Summary collapse
-
#close_milestones(version_name, options = {}) ⇒ Object
Close all the milestones containing the version name.
-
#define_tag(tag_name, changelog, options = {}) ⇒ Object
Create a new tag in the Repo.
Methods inherited from ApiClient
Constructor Details
This class inherits a constructor from Gitlab::Release::ApiClient
Instance Method Details
#close_milestones(version_name, options = {}) ⇒ Object
Close all the milestones containing the version name.
30 31 32 33 34 35 36 |
# File 'lib/gitlab/release/manager.rb', line 30 def close_milestones(version_name, = {}) project_id = [:project_id] || ENV["CI_PROJECT_ID"] select_milestones(project_id, version_name).each do |milestone| @client.edit_milestone(project_id, milestone.id, state_event: 'close') end end |
#define_tag(tag_name, changelog, options = {}) ⇒ Object
Create a new tag in the Repo.
17 18 19 20 21 22 |
# File 'lib/gitlab/release/manager.rb', line 17 def define_tag(tag_name, changelog, = {}) project_id = [:project_id] || ENV["CI_PROJECT_ID"] ref = [:ref] || ENV["CI_COMMIT_SHA"] @client.create_tag(project_id, tag_name, ref, '', changelog) end |