Class: Gitlab::Release::Changelog::Generator
- Defined in:
- lib/gitlab/release/changelog/generator.rb
Overview
This class generates the changelog entries
Instance Method Summary collapse
-
#changelog(version_name, options = {}) ⇒ Entries
Generate the changelog.
-
#initialize(options = {}) ⇒ Generator
constructor
A new instance of Generator.
Constructor Details
#initialize(options = {}) ⇒ Generator
Returns a new instance of Generator.
19 20 21 22 23 |
# File 'lib/gitlab/release/changelog/generator.rb', line 19 def initialize( = {}) @max_loops_merge_requests = [:max_loops_merge_requests] || 2000 @max_loop_issues = [:max_loop_issues] || 2000 super() end |
Instance Method Details
#changelog(version_name, options = {}) ⇒ Entries
Generate the changelog.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/gitlab/release/changelog/generator.rb', line 37 def changelog(version_name, = {}) project_id = [:project_id] || ENV["CI_PROJECT_ID"] include_mrs = [:include_mrs] || true include_issues = [:include_issues] || false filtering_mrs_labels = [:filtering_mrs_labels] || [:filtering_labels] || [] filtering_issue_labels = [:filtering_issues_labels] || [:filtering_labels] || [] entries = Entries.new if include_mrs changelog_from_merge_requests(entries, project_id, version_name, filtering_mrs_labels) end if include_issues changelog_from_issues(entries, project_id, version_name, filtering_issue_labels) end entries end |