lib/github_changelog_generator/generator/generator_generation.rb
def generate_header(newer_tag_name, newer_tag_link, newer_tag_time, older_tag_link, project_url)
      log = ""

      # Generate date string:
      time_string = newer_tag_time.strftime(options[:date_format])

      # Generate tag name and link
      release_url = if options[:release_url]
                      format(options[:release_url], newer_tag_link)
                    else
                      "#{project_url}/tree/#{newer_tag_link}"
                    end
      log += if newer_tag_name.equal?(options[:unreleased_label])
               "## [#{newer_tag_name}](#{release_url})\n\n"
             else
               "## [#{newer_tag_name}](#{release_url}) (#{time_string})\n"
             end

      if options[:compare_link] && older_tag_link
        # Generate compare link
        log += "[Full Changelog](#{project_url}/compare/#{older_tag_link}...#{newer_tag_link})\n\n"
      end

      log
    end
# It generate one header for section with specific parameters.
#
# @param [String] newer_tag_name - name of newer tag
# @param [String] newer_tag_link - used for links. Could be same as #newer_tag_name or some specific value, like HEAD
# @param [Time] newer_tag_time - time, when newer tag created
# @param [String] older_tag_link - tag name, used for links.
# @param [String] project_url - url for current project.
# @return [String] - Generate one ready-to-add section.
It generate one header for section with specific parameters.
It generate one header for section with specific parameters .
def generate_header(newer_tag_name, newer_tag_link, newer_tag_time, older_tag_link, project_url)
      log = ""
      time_string = newer_tag_time.strftime(options[:date_format])
      release_url = if options[:release_url]
                      format(options[:release_url], newer_tag_link)
                    else
                      "#{project_url}/tree/#{newer_tag_link}"
                    end
      log += if newer_tag_name.equal?(options[:unreleased_label])
               "## [#{newer_tag_name}](#{release_url})\n\n"
             else
               "## [#{newer_tag_name}](#{release_url}) (#{time_string})\n"
             end
      if options[:compare_link] && older_tag_link
        log += "[Full Changelog](#{project_url}/compare/#{older_tag_link}...#{newer_tag_link})\n\n"
      end
      log
    end
def generate_header ( newer_tag_name , newer_tag_link , newer_tag_time , older_tag_link , project_url ) log = "" time_string = newer_tag_time . strftime ( options [ :date_format ] ) release_url = if options [ :release_url ] format ( options [ :release_url ] , newer_tag_link ) else "#{project_url}/tree/#{newer_tag_link}" end log += if newer_tag_name . equal? ( options [ :unreleased_label ] ) "## [#{newer_tag_name}](#{release_url})\n\n" else "## [#{newer_tag_name}](#{release_url}) (#{time_string})\n" end if options [ :compare_link ] && older_tag_link log += "[Full Changelog](#{project_url}/compare/#{older_tag_link}...#{newer_tag_link})\n\n" end log end
It generate one header for section with specific parameters.
It generate one header for section with specific parameters .
# Generate date string: # Generate tag name and link # Generate compare link
Generate one ready-to-add section.
Generate one ready - to - add section .
String
newer_tag_name
newer_tag_link
newer_tag_time
older_tag_link
project_url
url for current project.
url for current project .