class Gitlab::Release::Manager

This class contains some tools to finish a release.

Public Instance Methods

close_milestones(version_name, options = {}) click to toggle source

Close all the milestones containing the version name.

@param [String] version_name Required. The name of the version. (ex: 1.0) @option [String or Integer] project_id Optional. The id of this project, given from GitLab. Default ENV

# File lib/gitlab/release/manager.rb, line 30
def close_milestones(version_name, options = {})
  project_id = options[: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 = {}) click to toggle source

Create a new tag in the Repo.

@param [String] tag_name Required. The name of the tag. (ex: 1.0) @param [String] changelog Optional. The release notes related to the tag. @option [String or Integer] project_id Optional. The id of this project, given from GitLab. Default ENV @option [String] ref Optional. The commit SHA. Default ENV

# File lib/gitlab/release/manager.rb, line 17
def define_tag(tag_name, changelog, options = {})
  project_id = options[:project_id] || ENV["CI_PROJECT_ID"]
  ref = options[:ref] || ENV["CI_COMMIT_SHA"]

  @client.create_tag(project_id, tag_name, ref, '', changelog)
end