summaryrefslogtreecommitdiff
path: root/lib/api/entities/issue_basic.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 15:44:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 15:44:42 +0000
commit4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch)
tree5423a1c7516cffe36384133ade12572cf709398d /lib/api/entities/issue_basic.rb
parente570267f2f6b326480d284e0164a6464ba4081bc (diff)
downloadgitlab-ce-4555e1b21c365ed8303ffb7a3325d773c9b8bf31.tar.gz
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'lib/api/entities/issue_basic.rb')
-rw-r--r--lib/api/entities/issue_basic.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/api/entities/issue_basic.rb b/lib/api/entities/issue_basic.rb
index cf96c6556ec..d27cc5498bd 100644
--- a/lib/api/entities/issue_basic.rb
+++ b/lib/api/entities/issue_basic.rb
@@ -3,6 +3,10 @@
module API
module Entities
class IssueBasic < IssuableEntity
+ format_with(:upcase) do |item|
+ item.upcase if item.respond_to?(:upcase)
+ end
+
expose :closed_at
expose :closed_by, using: Entities::UserBasic
@@ -16,6 +20,10 @@ module API
expose :milestone, using: Entities::Milestone
expose :assignees, :author, using: Entities::UserBasic
+ expose :issue_type,
+ as: :type,
+ format_with: :upcase,
+ documentation: { type: "String", desc: "One of #{Issue.issue_types.keys.map(&:upcase)}" }
expose :assignee, using: ::API::Entities::UserBasic do |issue|
issue.assignees.first
@@ -28,6 +36,7 @@ module API
expose :due_date
expose :confidential
expose :discussion_locked
+ expose :issue_type
expose :web_url do |issue|
Gitlab::UrlBuilder.build(issue)
@@ -42,4 +51,4 @@ module API
end
end
-API::Entities::IssueBasic.prepend_if_ee('EE::API::Entities::IssueBasic', with_descendants: true)
+API::Entities::IssueBasic.prepend_mod_with('API::Entities::IssueBasic', with_descendants: true)