diff options
author | Gabriel Mazetto <gabriel@gitlab.com> | 2016-04-18 21:52:43 -0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-04-19 11:00:30 +0200 |
commit | 5330af3fa69d4c47437ce27480c7f3b74652b2ca (patch) | |
tree | ebb871f468004a74cac5d737a231cf92defdf210 /lib | |
parent | 2384bed4d8e3f79461664911715e5f2a2a66c008 (diff) | |
download | gitlab-ce-5330af3fa69d4c47437ce27480c7f3b74652b2ca.tar.gz |
Using single builder for push and tag events
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/push_data_builder.rb | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/lib/gitlab/push_data_builder.rb b/lib/gitlab/push_data_builder.rb index eb8e45040bc..67622f321a6 100644 --- a/lib/gitlab/push_data_builder.rb +++ b/lib/gitlab/push_data_builder.rb @@ -41,6 +41,7 @@ module Gitlab # Hash to be passed as post_receive_data data = { object_kind: type, + event_name: type, before: oldrev, after: newrev, ref: ref, @@ -62,26 +63,6 @@ module Gitlab data end - def build_system(project, user, oldrev, newrev, ref) - type = Gitlab::Git.tag_ref?(ref) ? 'tag_push' : 'push' - - data = { - event_name: type, - before: oldrev, - after: newrev, - ref: ref, - checkout_sha: checkout_sha(project.repository, newrev, ref), - user_id: user.id, - user_name: user.name, - user_email: user.email, - user_avatar: user.avatar_url, - project_id: project.id, - project: project.hook_attrs(backward: false) - } - - data - end - # This method provide a sample data generated with # existing project and commits to test webhooks def build_sample(project, user) |