diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-05-15 23:24:19 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-05-15 23:24:19 +0300 |
commit | 950fa32a7c2c25d70bf8b2d495d759ce40bf2d9b (patch) | |
tree | 0215a0fe17940cce0118ab434a5636a0b9c63f9b /lib | |
parent | ffabab80a7b0cebe322aaf9bb2ca8e617a0b790f (diff) |
Revert "Merge branch 'bvl-rename-build-events-to-job-events' into 'master'"
This reverts merge request !11287
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/entities.rb | 4 | ||||
-rw-r--r-- | lib/api/project_hooks.rb | 2 | ||||
-rw-r--r-- | lib/api/v3/entities.rb | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 01cc8e8e1ca..3fc2b453eb6 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 :job_events + expose :build_events, as: :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 :job_events + expose :build_events, as: :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 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 diff --git a/lib/api/v3/entities.rb b/lib/api/v3/entities.rb index 332f233bf5e..56a9b019f1b 100644 --- a/lib/api/v3/entities.rb +++ b/lib/api/v3/entities.rb @@ -238,8 +238,7 @@ 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, :pipeline_events - expose :job_events, as: :build_events + expose :tag_push_events, :note_events, :build_events, :pipeline_events # Expose serialized properties expose :properties do |service, options| field_names = service.fields. @@ -251,8 +250,7 @@ module API class ProjectHook < ::API::Entities::Hook expose :project_id, :issues_events, :merge_requests_events - expose :note_events, :pipeline_events, :wiki_page_events - expose :job_events, as: :build_events + expose :note_events, :build_events, :pipeline_events, :wiki_page_events end class Issue < ::API::Entities::Issue |