summaryrefslogtreecommitdiff
path: root/app/models/event.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-02-13 12:01:28 +0100
committerDouwe Maan <douwe@gitlab.com>2015-02-13 12:02:58 +0100
commit9b917b4a73ddd7607cd19847e89381fda0ec65d5 (patch)
tree8f571ab7587c79de29cb0640422931b333f75db1 /app/models/event.rb
parent522efa43fe9ff5828838a5d5ed49db23bfd88c95 (diff)
downloadgitlab-ce-9b917b4a73ddd7607cd19847e89381fda0ec65d5.tar.gz
Add "User created project Namespace / Project" event
Diffstat (limited to 'app/models/event.rb')
-rw-r--r--app/models/event.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/models/event.rb b/app/models/event.rb
index 87be24e31a8..cae7f0be85b 100644
--- a/app/models/event.rb
+++ b/app/models/event.rb
@@ -61,6 +61,8 @@ class Event < ActiveRecord::Base
true
elsif membership_changed?
true
+ elsif created_project?
+ true
else
(issue? || merge_request? || note? || milestone?) && target
end
@@ -114,6 +116,14 @@ class Event < ActiveRecord::Base
joined? || left?
end
+ def created_project?
+ created? && !target
+ end
+
+ def created_target?
+ created? && target
+ end
+
def milestone?
target_type == "Milestone"
end
@@ -165,6 +175,8 @@ class Event < ActiveRecord::Base
'left'
elsif commented?
"commented on"
+ elsif created_project?
+ "created"
else
"opened"
end