From 0cbafa4d65c31feef9e9651c40eca5dc820bc9ed Mon Sep 17 00:00:00 2001 From: Zhang Sen Date: Fri, 24 Apr 2015 18:27:52 +0800 Subject: Fix contributions calendar empty problem under mysql When using MySQL as database backend in GitLab, ``date`` in ``date(created_at), count(id) as total_amount`` won't return the ``date`` column (should be ``date(created_at)``), as a result, there's no contribution in the user profile page. Adding an ``as date`` can solve this problem. --- lib/gitlab/contributions_calendar.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/gitlab/contributions_calendar.rb b/lib/gitlab/contributions_calendar.rb index 3fd0823df06..45bb904ed7a 100644 --- a/lib/gitlab/contributions_calendar.rb +++ b/lib/gitlab/contributions_calendar.rb @@ -17,7 +17,7 @@ module Gitlab events = Event.reorder(nil).contributions.where(author_id: user.id). where("created_at > ?", date_from).where(project_id: projects). group('date(created_at)'). - select('date(created_at), count(id) as total_amount'). + select('date(created_at) as date, count(id) as total_amount'). map(&:attributes) dates = (1.year.ago.to_date..(Date.today + 1.day)).to_a -- cgit v1.2.1 From 2e34b7aab5ad91bdcfde80486e8b4bcc17cb2241 Mon Sep 17 00:00:00 2001 From: tonic Date: Sat, 25 Apr 2015 15:49:28 +0800 Subject: fix redis 3.0.0 --- lib/tasks/gitlab/check.rake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake index 04a2eb12db0..1a6303b6c82 100644 --- a/lib/tasks/gitlab/check.rake +++ b/lib/tasks/gitlab/check.rake @@ -282,7 +282,8 @@ namespace :gitlab do def check_redis_version print "Redis version >= 2.0.0? ... " - if run_and_match(%W(redis-cli --version), /redis-cli 2.\d.\d/) + redis_version = run(%W(redis-cli --version)) + if redis_version.try(:match, /redis-cli 2.\d.\d/) || redis_version.try(:match, /redis-cli 3.\d.\d/) puts "yes".green else puts "no".red -- cgit v1.2.1 From 548f182814acd0f7a110e6c165c186e345901b00 Mon Sep 17 00:00:00 2001 From: bugagazavr Date: Sat, 24 Jan 2015 03:10:43 +0300 Subject: Added X-GitLab-Event header for web hooks --- lib/api/system_hooks.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/api/system_hooks.rb b/lib/api/system_hooks.rb index 518964db50d..22b8f90dc5c 100644 --- a/lib/api/system_hooks.rb +++ b/lib/api/system_hooks.rb @@ -47,7 +47,7 @@ module API owner_name: "Someone", owner_email: "example@gitlabhq.com" } - @hook.execute(data) + @hook.execute(data, 'system_hooks') data end -- cgit v1.2.1