diff options
author | Hannes Rosenögger <123haynes@gmail.com> | 2015-03-13 13:39:26 +0300 |
---|---|---|
committer | Hannes Rosenögger <123haynes@gmail.com> | 2015-03-18 10:42:42 +0300 |
commit | 9e5738b0072f8715d52801f3469be9f3742beb97 (patch) | |
tree | e6f83c4c42e05309ef20150796aefe372026e68f /lib | |
parent | dbd347bfa00e133da8ac178612ed8c30ef871ca4 (diff) |
Extend the commit calendar to show the actual commits for a date
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/commits_calendar.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/gitlab/commits_calendar.rb b/lib/gitlab/commits_calendar.rb index 2f30d238e6b..8963d346b6f 100644 --- a/lib/gitlab/commits_calendar.rb +++ b/lib/gitlab/commits_calendar.rb @@ -22,6 +22,14 @@ module Gitlab end end + def self.get_commits_for_date(projects, user, date) + user_commits = {} + projects.reject(&:forked?).each do |project| + user_commits[project] = ProjectContributions.new(project, user).user_commits_on_date(date) + end + user_commits + end + def starting_year (Time.now - 1.year).strftime("%Y") end |