Class: QAT::Devel::GitLab::ReleaseNote

Inherits:
Object
  • Object
show all
Defined in:
lib/qat/devel/lib/gitlab/release_note.rb

Overview

Creates a new release note

Since:

  • 6.0.0

Defined Under Namespace

Classes: InvalidTagsError

Constant Summary collapse

TAGS =

Since:

  • 6.0.0

['Story', 'Bug', 'Task', 'Deploy', 'Release']

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project, version, issue_list) ⇒ ReleaseNote

Returns a new instance of ReleaseNote.

Parameters:

  • issue_list (Array)

    list of issues for generating the release note

Since:

  • 6.0.0



18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/qat/devel/lib/gitlab/release_note.rb', line 18

def initialize(project, version, issue_list)
  @project = project
  @version = version
  @issues  = parse_issues(issue_list)

  template = File.join(File.dirname(__FILE__), 'release_note', 'template.md.erb')

  content = ERB.new(File.read(template), nil, '-').result(binding)

  FileUtils.mkdir_p(File.join(Dir.pwd, 'public'))
  File.write(File.join(Dir.pwd, 'public', "release_note_#{@version}.md"), content)

  @text = content
end

Instance Attribute Details

#textObject (readonly)

Since:

  • 6.0.0



10
11
12
# File 'lib/qat/devel/lib/gitlab/release_note.rb', line 10

def text
  @text
end