Stop loading MergeRequestEntity data on sidebar request

This commit is contained in:
Oswaldo Ferreira 2017-05-18 20:05:47 -03:00
parent 7efa0aa02c
commit a355bcac4b
5 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,5 @@
class MergeRequestBasicEntity < Grape::Entity
expose :assignee_id
expose :merge_status
expose :merge_error
expose :state

View File

@ -1,7 +1,6 @@
class MergeRequestEntity < IssuableEntity
include RequestAwareEntity
expose :assignee_id
expose :in_progress_merge_commit_sha
expose :locked_at
expose :merge_commit_sha

View File

@ -140,7 +140,7 @@
:javascript
gl.sidebarOptions = {
endpoint: "#{issuable_json_path(issuable)}",
endpoint: "#{issuable_json_path(issuable)}?basic=true",
editable: #{can_edit_issuable ? true : false},
currentUser: #{current_user.to_json(only: [:username, :id, :name], methods: :avatar_url)},
rootPath: "#{root_path}"

View File

@ -3,7 +3,6 @@
"properties" : {
"id": { "type": "integer" },
"iid": { "type": "integer" },
"assignee_id": { "type": ["integer", "null"] },
"author_id": { "type": "integer" },
"description": { "type": ["string", "null"] },
"lock_version": { "type": ["string", "null"] },

View File

@ -8,7 +8,8 @@
"total_time_spent": { "type": "integer" },
"human_time_estimate": { "type": ["string", "null"] },
"human_total_time_spent": { "type": ["string", "null"] },
"merge_error": { "type": ["string", "null"] }
"merge_error": { "type": ["string", "null"] },
"assignee_id": { "type": ["integer", "null"] }
},
"additionalProperties": false
}