diff --git a/lib/github_changelog_generator/generator/section.rb b/lib/github_changelog_generator/generator/section.rb index 49e2c00dc..5ef8dab94 100644 --- a/lib/github_changelog_generator/generator/section.rb +++ b/lib/github_changelog_generator/generator/section.rb @@ -7,7 +7,23 @@ module GitHubChangelogGenerator # # @see GitHubChangelogGenerator::Entry class Section - attr_accessor :name, :options, :prefix, :issues, :labels, :body_only + # @return [String] + attr_accessor :name + + # @return [String] a merge prefix, or an issue prefix + attr_reader :prefix + + # @return [Array] + attr_reader :issues + + # @return [Array] + attr_reader :labels + + # @return [Boolean] + attr_reader :body_only + + # @return [Options] + attr_reader :options def initialize(opts = {}) @name = opts[:name] @@ -16,6 +32,7 @@ def initialize(opts = {}) @issues = opts[:issues] || [] @options = opts[:options] || Options.new({}) @body_only = opts[:body_only] || false + @entry = Entry.new(options) end # Returns the content of a section. @@ -49,7 +66,7 @@ def get_string_for_issue(issue) encapsulated_title = encapsulate_string issue["title"] title_with_number = "#{encapsulated_title} [\\##{issue['number']}](#{issue['html_url']})" - title_with_number = "#{title_with_number}#{Entry.new(options).line_labels_for(issue)}" if @options[:issue_line_labels].present? + title_with_number = "#{title_with_number}#{@entry.line_labels_for(issue)}" if @options[:issue_line_labels].present? line = issue_line_with_user(title_with_number, issue) issue_line_with_body(line, issue) end pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy