Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHannes Rosenögger <123haynes@gmail.com>2015-03-13 13:39:26 +0300
committerHannes Rosenögger <123haynes@gmail.com>2015-03-18 10:42:42 +0300
commit9e5738b0072f8715d52801f3469be9f3742beb97 (patch)
treee6f83c4c42e05309ef20150796aefe372026e68f /lib
parentdbd347bfa00e133da8ac178612ed8c30ef871ca4 (diff)
Extend the commit calendar to show the actual commits for a date
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/commits_calendar.rb8
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