summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-05-16 15:02:08 +0000
committerDouwe Maan <douwe@gitlab.com>2017-05-16 15:02:08 +0000
commit0bc2fef9758ebfad053ab08f4fdb4958cf44521f (patch)
treef1a984370a4f5917b50185ed83e58848849ac54c /lib
parentbf56c3a942481ebcadf0cd6be4b0e418293ca1bc (diff)
parent1fd83f972cf5ce73b3e46fd2df5ffb07889b1fd1 (diff)
downloadgitlab-ce-0bc2fef9758ebfad053ab08f4fdb4958cf44521f.tar.gz
Merge branch 'cherry-pick-0663458c' into 'master'
Rename `build_events` to `job_events`, take 2. Closes #31620 See merge request !11403
Diffstat (limited to 'lib')
-rw-r--r--lib/api/entities.rb4
-rw-r--r--lib/api/project_hooks.rb2
-rw-r--r--lib/api/v3/entities.rb6
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 3fc2b453eb6..01cc8e8e1ca 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -60,7 +60,7 @@ module API
class ProjectHook < Hook
expose :project_id, :issues_events, :merge_requests_events
expose :note_events, :pipeline_events, :wiki_page_events
- expose :build_events, as: :job_events
+ expose :job_events
end
class BasicProjectDetails < Grape::Entity
@@ -470,7 +470,7 @@ module API
expose :id, :title, :created_at, :updated_at, :active
expose :push_events, :issues_events, :merge_requests_events
expose :tag_push_events, :note_events, :pipeline_events
- expose :build_events, as: :job_events
+ expose :job_events
# Expose serialized properties
expose :properties do |service, options|
field_names = service.fields.
diff --git a/lib/api/project_hooks.rb b/lib/api/project_hooks.rb
index 87dfd1573a4..7a345289617 100644
--- a/lib/api/project_hooks.rb
+++ b/lib/api/project_hooks.rb
@@ -54,7 +54,6 @@ 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)
@@ -78,7 +77,6 @@ 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
diff --git a/lib/api/v3/entities.rb b/lib/api/v3/entities.rb
index 56a9b019f1b..332f233bf5e 100644
--- a/lib/api/v3/entities.rb
+++ b/lib/api/v3/entities.rb
@@ -238,7 +238,8 @@ module API
class ProjectService < Grape::Entity
expose :id, :title, :created_at, :updated_at, :active
expose :push_events, :issues_events, :merge_requests_events
- expose :tag_push_events, :note_events, :build_events, :pipeline_events
+ expose :tag_push_events, :note_events, :pipeline_events
+ expose :job_events, as: :build_events
# Expose serialized properties
expose :properties do |service, options|
field_names = service.fields.
@@ -250,7 +251,8 @@ module API
class ProjectHook < ::API::Entities::Hook
expose :project_id, :issues_events, :merge_requests_events
- expose :note_events, :build_events, :pipeline_events, :wiki_page_events
+ expose :note_events, :pipeline_events, :wiki_page_events
+ expose :job_events, as: :build_events
end
class Issue < ::API::Entities::Issue