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:
authorbilly.lb <billy.lb@alibaba-inc.com>2017-03-16 16:28:34 +0300
committerbilly.lb <billy.lb@alibaba-inc.com>2017-03-16 16:28:34 +0300
commit0de8dccd2a7a5e07805fe6c151e44cf4ad3bf86f (patch)
tree43fe00786b904397ae08b8404ea6d88ab45b607f /app/services/system_hooks_service.rb
parent4a81867df14801c302f72096de8ee5327cfb4a39 (diff)
Fix bug when system hook for deploy key
Diffstat (limited to 'app/services/system_hooks_service.rb')
-rw-r--r--app/services/system_hooks_service.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/app/services/system_hooks_service.rb b/app/services/system_hooks_service.rb
index 868fa7b3f21..af0ddbe5934 100644
--- a/app/services/system_hooks_service.rb
+++ b/app/services/system_hooks_service.rb
@@ -24,10 +24,9 @@ class SystemHooksService
key: model.key,
id: model.id
)
+
if model.user
- data.merge!(
- username: model.user.username
- )
+ data[:username] = model.user.username
end
when Project
data.merge!(project_data(model))
@@ -35,8 +34,6 @@ class SystemHooksService
if event == :rename || event == :transfer
data[:old_path_with_namespace] = model.old_path_with_namespace
end
-
- data
when User
data.merge!({
name: model.name,
@@ -59,6 +56,8 @@ class SystemHooksService
when GroupMember
data.merge!(group_member_data(model))
end
+
+ data
end
def build_event_name(model, event)