Module: ChangesSince
- Defined in:
- lib/changes_since.rb,
lib/changes_since/version.rb,
lib/changes_since/api_client.rb,
lib/changes_since/commit_parser.rb,
lib/changes_since/changelog_printer.rb
Defined Under Namespace
Classes: ApiClient, ChangelogPrinter, CommitParser
Constant Summary
collapse
- VERSION =
"0.1.1"
Class Method Summary
collapse
Class Method Details
.fetch(teams = nil) ⇒ Object
5
6
7
8
9
10
11
12
13
|
# File 'lib/changes_since.rb', line 5
def self.fetch(teams=nil)
options = parse_options
puts "Enter tag:"
tag = gets.chomp
parser = CommitParser.new(tag, options)
commits = parser.parse
printer = ChangelogPrinter.new(commits, teams, options)
printer.print!
end
|
.parse_options ⇒ Object
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# File 'lib/changes_since.rb', line 15
def self.parse_options
options = {}
OptionParser.new do |opts|
opts.banner = "Usage: script/changes_since TAG [options]"
opts.on("-a", "--all", "Consider all interesting commits ([AI-1234] or [ZD#1234] or #bug/public/internal), not just PR merges") do |a|
options[:all] = a
end
opts.on("-f", "--filter [authors]", "Limit to authors matching the passed string(s). Comma-separated list works.") do |authors|
options[:author_filter] = authors.split(",")
end
opts.on("-t", "--tags", "Group commits by public, internal or bugs") do |t|
options[:tags] = t
end
opts.on("-m", "--markdown", "Use tables in Atlassian as markdown") do |m|
options[:markdown] = m
end
end.parse!
options
end
|