Method: GitStats::GitData::Repo#comments_count_by_date

Defined in:
lib/git_stats/git_data/repo.rb

#comments_count_by_dateObject



93
94
95
96
97
98
99
100
# File 'lib/git_stats/git_data/repo.rb', line 93

def comments_count_by_date
  sum = 0
  @comments_count_by_date ||= commits.map do |commit|
    sum += commit.comment_stat.insertions
    sum -= commit.comment_stat.deletions
    [commit.date.to_date, sum]
  end.to_h.fill_empty_days!(aggregated: true)
end