diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-12-18 11:28:02 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-12-18 11:28:02 +0000 |
commit | 3870a1bde276144a05a31185ede7a5032818d489 (patch) | |
tree | 0e8d69c1859be1d59de6a2edd1abf599d3618948 /app/controllers | |
parent | c20720cf84132d7bf14763aba0570bd8882f9c6d (diff) | |
parent | cba40a1f551e4c1b46bfa49a709f59feb59782bd (diff) | |
download | gitlab-ce-3870a1bde276144a05a31185ede7a5032818d489.tar.gz |
Merge branch 'osw-isolate-mr-widget-exposed-attributes' into 'master'
Stop sending milestone and labels for Projects::MergeRequestsController#show.json requests
See merge request gitlab-org/gitlab-ce!15847
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/merge_requests_controller.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index e7b3b73024b..6b59c8461a3 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -131,7 +131,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo .new(project, current_user, wip_event: 'unwip') .execute(@merge_request) - render json: serializer.represent(@merge_request) + render json: serialize_widget(@merge_request) end def commit_change_content @@ -147,7 +147,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo .new(@project, current_user) .cancel(@merge_request) - render json: serializer.represent(@merge_request) + render json: serialize_widget(@merge_request) end def merge @@ -304,6 +304,10 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo end end + def serialize_widget(merge_request) + serializer.represent(merge_request, serializer: 'widget') + end + def serializer MergeRequestSerializer.new(current_user: current_user, project: merge_request.project) end |