summaryrefslogtreecommitdiff
path: root/lib/api/project_hooks.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-10-03 13:38:56 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-10-03 13:38:56 +0300
commitac6f0321227c3df4ed9a255eccaaafa2d9527d4b (patch)
treee43e4f4230f6242591d3053865ea6a760a157d9b /lib/api/project_hooks.rb
parent03b44916ba08ac766bb6763882be5704dca5b4ea (diff)
parentb4963e9dda1ced7c219f24172e9fa4c8a5076b69 (diff)
downloadgitlab-ce-ac6f0321227c3df4ed9a255eccaaafa2d9527d4b.tar.gz
Merge pull request #7779 from Bugagazavr/hook_tag_push_events
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