diff options
Diffstat (limited to 'lib/api/project_hooks.rb')
-rw-r--r-- | lib/api/project_hooks.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/project_hooks.rb b/lib/api/project_hooks.rb index 7a345289617..87dfd1573a4 100644 --- a/lib/api/project_hooks.rb +++ b/lib/api/project_hooks.rb @@ -54,6 +54,7 @@ module API end post ":id/hooks" do hook_params = declared_params(include_missing: false) + hook_params[:build_events] = hook_params.delete(:job_events) { false } hook = user_project.hooks.new(hook_params) @@ -77,6 +78,7 @@ module API hook = user_project.hooks.find(params.delete(:hook_id)) update_params = declared_params(include_missing: false) + update_params[:build_events] = update_params.delete(:job_events) if update_params[:job_events] if hook.update_attributes(update_params) present hook, with: Entities::ProjectHook |