Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2018-11-09 03:19:48 +0300
committerThong Kuah <tkuah@gitlab.com>2018-11-09 03:19:48 +0300
commit03dba01273d548ab8c0dd82408400a834fb4e10f (patch)
treef5d5da30035fbfa84922d11b3328ed3866382914 /app/serializers/issue_board_entity.rb
parentab61bee378ed45ff01d74742b54149533811a204 (diff)
Revert "Extract code into IssueBoardEntity"
This reverts commit 8c126525faba40032244328187ba73a53b6eaf4c.
Diffstat (limited to 'app/serializers/issue_board_entity.rb')
-rw-r--r--app/serializers/issue_board_entity.rb52
1 files changed, 0 insertions, 52 deletions
diff --git a/app/serializers/issue_board_entity.rb b/app/serializers/issue_board_entity.rb
deleted file mode 100644
index 4e3d03b236b..00000000000
--- a/app/serializers/issue_board_entity.rb
+++ /dev/null
@@ -1,52 +0,0 @@
-# frozen_string_literal: true
-
-class IssueBoardEntity < Grape::Entity
- include RequestAwareEntity
-
- expose :id
- expose :iid
- expose :title
-
- expose :confidential
- expose :due_date
- expose :project_id
- expose :relative_position
- expose :weight, if: -> (*) { respond_to?(:weight) }
- expose :time_estimate
-
- expose :project do |issue|
- API::Entities::Project.represent issue.project, only: [:id, :path]
- end
-
- expose :milestone, expose_nil: false do |issue|
- API::Entities::Project.represent issue.milestone, only: [:id, :title]
- end
-
- expose :assignees do |issue|
- API::Entities::UserBasic.represent issue.assignees, only: [:id, :name, :username, :avatar_url]
- end
-
- expose :labels do |issue|
- LabelEntity.represent issue.labels, project: issue.project, only: [:id, :title, :description, :color, :priority, :text_color]
- end
-
- expose :reference_path, if: -> (issue) { issue.project } do |issue, options|
- options[:include_full_project_path] ? issue.to_reference(full: true) : issue.to_reference
- end
-
- expose :real_path, if: -> (issue) { issue.project } do |issue|
- project_issue_path(issue.project, issue)
- end
-
- expose :issue_sidebar_endpoint, if: -> (issue) { issue.project } do |issue|
- project_issue_path(issue.project, issue, format: :json, serializer: 'sidebar')
- end
-
- expose :toggle_subscription_endpoint, if: -> (issue) { issue.project } do |issue|
- toggle_subscription_project_issue_path(issue.project, issue)
- end
-
- expose :assignable_labels_endpoint, if: -> (issue) { issue.project } do |issue|
- project_labels_path(issue.project, format: :json, include_ancestor_groups: true)
- end
-end