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
diff options
context:
space:
mode:
authorVinnie Okada <vokada@mrvinn.com>2015-03-21 18:03:35 +0300
committerVinnie Okada <vokada@mrvinn.com>2015-03-21 18:03:35 +0300
commitf5e65e2e508269ff7c18318526ba01f8e7d83951 (patch)
treedd834b066dc51de87139d69ea042e0bdfd69334d /app/models/project_contributions.rb
parentcc29ce491786d631586c3b0d0da310b8b790a673 (diff)
parent6cf189f0a92772b9174f913e7c74a4889d54e9a6 (diff)
Merge branch 'master' into markdown-tags
Merge updated CHANGELOG entries
Diffstat (limited to 'app/models/project_contributions.rb')
-rw-r--r--app/models/project_contributions.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models/project_contributions.rb b/app/models/project_contributions.rb
index 8ab2d814a94..bfe9928b158 100644
--- a/app/models/project_contributions.rb
+++ b/app/models/project_contributions.rb
@@ -17,6 +17,15 @@ class ProjectContributions
end
end
+ def user_commits_on_date(date)
+ repository = @project.repository
+
+ if !repository.exists? || repository.empty?
+ return []
+ end
+ commits = repository.commits_by_user_on_date_log(@user, date)
+ end
+
def cache_key
"#{Date.today.to_s}-commits-log-#{project.id}-#{user.email}"
end