summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorZ.J. van de Weg <git@zjvandeweg.nl>2017-04-10 12:05:29 +0200
committerZ.J. van de Weg <git@zjvandeweg.nl>2017-04-12 10:06:57 +0200
commite415ad3952701cae3cad55c114e1a839ec510478 (patch)
treef647255dcd3272ffaf37b70230390e23553d46d8 /app/controllers
parentd59f48987baceb25aa87dc6d87551f68af4bb1ed (diff)
downloadgitlab-ce-e415ad3952701cae3cad55c114e1a839ec510478.tar.gz
Fix API not accepting job_events for webhookszj-api-fix-build-events
When renaming, the argument on the projects hook API was forgotten. Now one could successfully set it again. The fix is a little ugly stylewise, but needed as the underlying model still refers to it as build_events. This commit is to fix it, later we should migrate the data to a new column. The edit on the spec file makes sure it passes now, and will fail when we migrate the column.
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/hooks_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/hooks_controller.rb b/app/controllers/projects/hooks_controller.rb
index b668a9331e7..1e41f980f31 100644
--- a/app/controllers/projects/hooks_controller.rb
+++ b/app/controllers/projects/hooks_controller.rb
@@ -10,7 +10,7 @@ class Projects::HooksController < Projects::ApplicationController
@hook = @project.hooks.new(hook_params)
@hook.save
- unless @hook.valid?
+ unless @hook.valid?
@hooks = @project.hooks.select(&:persisted?)
flash[:alert] = @hook.errors.full_messages.join.html_safe
end
@@ -49,7 +49,7 @@ class Projects::HooksController < Projects::ApplicationController
def hook_params
params.require(:hook).permit(
- :build_events,
+ :job_events,
:pipeline_events,
:enable_ssl_verification,
:issues_events,