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:
authorSteve Norman <steve.norman@thomsonreuters.com>2015-05-05 18:13:11 +0300
committerSteve Norman <steve.norman@thomsonreuters.com>2016-01-04 16:48:00 +0300
commit79ec7f289748ca5812d51c3a61e3a2f9c2464fda (patch)
treee882f0feb35cc9e8d2247b53f4bfad88b69ca82a /app/services/system_hooks_service.rb
parent57074d606b20516921ff2297e2f94262b58e3d3e (diff)
Added system hooks messages for renaming and transferring a project
Diffstat (limited to 'app/services/system_hooks_service.rb')
-rw-r--r--app/services/system_hooks_service.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/app/services/system_hooks_service.rb b/app/services/system_hooks_service.rb
index 8b5143e1eb7..6dc854ec33d 100644
--- a/app/services/system_hooks_service.rb
+++ b/app/services/system_hooks_service.rb
@@ -18,7 +18,8 @@ class SystemHooksService
def build_event_data(model, event)
data = {
event_name: build_event_name(model, event),
- created_at: model.created_at.xmlschema
+ created_at: model.created_at.xmlschema,
+ updated_at: model.updated_at.xmlschema
}
case model
@@ -34,6 +35,14 @@ class SystemHooksService
end
when Project
data.merge!(project_data(model))
+
+ if event == :rename || event == :transfer
+ data.merge!({
+ old_path_with_namespace: model.old_path_with_namespace
+ })
+ end
+
+ data
when User
data.merge!({
name: model.name,