lib/herodot/project_link.rb in herodot-0.2.1 vs lib/herodot/project_link.rb in herodot-0.2.2
- old
+ new
@@ -25,13 +25,11 @@
end
private
def decorated_logs(logs)
- logs.map do |log|
- decorated_log(log)
- end
+ logs.map { |log| decorated_log(log) }
end
def decorated_log(log)
link = issue_management_link(log)
return log if link.nil?
@@ -39,10 +37,10 @@
end
def issue_management_link(log)
config = @project_configurations.fetch(log[:path], load_project_configuration(log[:path]))
return nil unless config.fetch(:link, false)
- ticket = log[:branch].scan(Regexp.new(config.fetch(:pattern, /$^/)))
+ ticket = log[:branch].scan(Regexp.new(config.fetch(:pattern, /$^/), Regexp::IGNORECASE))
[config[:link], ticket.first].join if ticket.any?
end
def load_project_configuration(path)
file = self.class.project_config_file(path)