summaryrefslogtreecommitdiff
path: root/app/models/event.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-01-26 18:59:50 +0100
committerRémy Coutable <remy@rymai.me>2017-02-13 18:59:13 +0100
commit4f51e1fad0609c0cd50468243a83970728186a8e (patch)
tree3715351f174cd5a42a88893296ef08f9befb838c /app/models/event.rb
parent79d68383030f8aa7c97d3df53ae90137383eb0cd (diff)
downloadgitlab-ce-4f51e1fad0609c0cd50468243a83970728186a8e.tar.gz
Add comment events to contributions calendar22645-add-discussion-contribs-to-calendar
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/models/event.rb')
-rw-r--r--app/models/event.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/models/event.rb b/app/models/event.rb
index 2662f170765..1a5828a2828 100644
--- a/app/models/event.rb
+++ b/app/models/event.rb
@@ -45,9 +45,10 @@ class Event < ActiveRecord::Base
class << self
# Update Gitlab::ContributionsCalendar#activity_dates if this changes
def contributions
- where("action = ? OR (target_type in (?) AND action in (?))",
- Event::PUSHED, ["MergeRequest", "Issue"],
- [Event::CREATED, Event::CLOSED, Event::MERGED])
+ where("action = ? OR (target_type IN (?) AND action IN (?)) OR (target_type = ? AND action = ?)",
+ Event::PUSHED,
+ ["MergeRequest", "Issue"], [Event::CREATED, Event::CLOSED, Event::MERGED],
+ "Note", Event::COMMENTED)
end
def limit_recent(limit = 20, offset = nil)