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:
authorSean McGivern <sean@mcgivern.me.uk>2017-02-14 14:18:40 +0300
committerSean McGivern <sean@mcgivern.me.uk>2017-02-14 14:18:40 +0300
commit478e01ce7b38cdbdff8bd2b7138abd31cf1c37f9 (patch)
tree7674f1313bc9a1b0d12b2687680ae368b7fa0887 /app/models/event.rb
parent640e977d4d5b6ab8f0c48f3b58a14ed2301d8257 (diff)
parent4f51e1fad0609c0cd50468243a83970728186a8e (diff)
Merge branch '22645-add-discussion-contribs-to-calendar' into 'master'
Add discussion events to contributions calendar Closes #22645 See merge request !8821
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 cf89ac5207f..e5027df3f8a 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)