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:
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r--lib/api/entities.rb22
1 files changed, 16 insertions, 6 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 4edec631e8d..beb8ce349b4 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -1019,12 +1019,17 @@ module API
label.open_merge_requests_count(options[:current_user])
end
- expose :priority do |label, options|
- label.priority(options[:project])
+ expose :subscribed do |label, options|
+ label.subscribed?(options[:current_user], options[:parent])
end
+ end
- expose :subscribed do |label, options|
- label.subscribed?(options[:current_user], options[:project])
+ class GroupLabel < Label
+ end
+
+ class ProjectLabel < Label
+ expose :priority do |label, options|
+ label.priority(options[:parent])
end
end
@@ -1116,7 +1121,9 @@ module API
class Release < TagRelease
expose :name
- expose :description_html
+ expose :description_html do |entity|
+ MarkupHelper.markdown_field(entity, :description)
+ end
expose :created_at
expose :author, using: Entities::UserBasic, if: -> (release, _) { release.author.present? }
expose :commit, using: Entities::Commit
@@ -1223,8 +1230,11 @@ module API
end
class Trigger < Grape::Entity
+ include ::API::Helpers::Presentable
+
expose :id
- expose :token, :description
+ expose :token
+ expose :description
expose :created_at, :updated_at, :last_used
expose :owner, using: Entities::UserBasic
end