summaryrefslogtreecommitdiff
path: root/lib/api/project_hooks.rb
diff options
context:
space:
mode:
authorKirill Zaitsev <kirik910@gmail.com>2014-09-19 12:23:18 +0400
committerKirill Zaitsev <kirik910@gmail.com>2014-10-03 10:23:32 +0400
commitb4963e9dda1ced7c219f24172e9fa4c8a5076b69 (patch)
tree374799440bccd7a984af8d20a9f366d22c7267ab /lib/api/project_hooks.rb
parenta3d90c5045ae322a013484165cdebcd764dc5d69 (diff)
downloadgitlab-ce-b4963e9dda1ced7c219f24172e9fa4c8a5076b69.tar.gz
Add tag_push_events to project hook api
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