Class: GithubChangelogEntry::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/github_changelog_entry/cli.rb

Instance Method Summary collapse

Instance Method Details

#generateObject



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/github_changelog_entry/cli.rb', line 22

def generate
  puts Paint["Generating a new changelog entry", :blue, :bold]

  github_handler = GithubChangelogEntry::Github.new(options[:token], options[:repo])

  issues_options = options.select do |key, value|
    [
      "origin_tag",
      "milestone_number",
      "default_to_latest_tag",
      "issue_state"
    ].include?(key)
  end
  GithubChangelogEntry::Generator.new.generate(
    github_handler.closed_issues(issues_options)
  )
end