summaryrefslogtreecommitdiff
path: root/lib/api/project_hooks.rb
diff options
context:
space:
mode:
authorKeith Pitt <me@keithpitt.com>2014-10-08 16:33:53 +0800
committerKeith Pitt <me@keithpitt.com>2014-10-08 16:33:53 +0800
commit4c7da578f200f0bc721cc2cae27eb2b25f96e8dd (patch)
tree565b5b7746bc2cff8e46883b4d1836dfaa0246ef /lib/api/project_hooks.rb
parent76594d474ca6d04c2e608e7b3df1229729288f14 (diff)
parent928178deb9d582d7537a57983ff9e695f07dab1f (diff)
downloadgitlab-ce-4c7da578f200f0bc721cc2cae27eb2b25f96e8dd.tar.gz
Merge branch 'master' into buildbox-service
Conflicts: app/models/project.rb
Diffstat (limited to 'lib/api/project_hooks.rb')
-rw-r--r--lib/api/project_hooks.rb16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/api/project_hooks.rb b/lib/api/project_hooks.rb
index 79c3d122d32..7d056b9bf58 100644
--- a/lib/api/project_hooks.rb
+++ b/lib/api/project_hooks.rb
@@ -38,7 +38,13 @@ module API
# POST /projects/:id/hooks
post ":id/hooks" do
required_attributes! [:url]
- attrs = attributes_for_keys [:url, :push_events, :issues_events, :merge_requests_events]
+ attrs = attributes_for_keys [
+ :url,
+ :push_events,
+ :issues_events,
+ :merge_requests_events,
+ :tag_push_events
+ ]
@hook = user_project.hooks.new(attrs)
if @hook.save
@@ -62,7 +68,13 @@ module API
put ":id/hooks/:hook_id" do
@hook = user_project.hooks.find(params[:hook_id])
required_attributes! [:url]
- attrs = attributes_for_keys [:url, :push_events, :issues_events, :merge_requests_events]
+ attrs = attributes_for_keys [
+ :url,
+ :push_events,
+ :issues_events,
+ :merge_requests_events,
+ :tag_push_events
+ ]
if @hook.update_attributes attrs
present @hook, with: Entities::ProjectHook