diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 15:44:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 15:44:42 +0000 |
commit | 4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch) | |
tree | 5423a1c7516cffe36384133ade12572cf709398d /lib/api/entities/issue_basic.rb | |
parent | e570267f2f6b326480d284e0164a6464ba4081bc (diff) | |
download | gitlab-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.rb | 11 |
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) |