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 'app/serializers/stage_entity.rb')
-rw-r--r--app/serializers/stage_entity.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/app/serializers/stage_entity.rb b/app/serializers/stage_entity.rb
index 7a047bdc712..cee0089056f 100644
--- a/app/serializers/stage_entity.rb
+++ b/app/serializers/stage_entity.rb
@@ -7,9 +7,11 @@ class StageEntity < Grape::Entity
"#{stage.name}: #{detailed_status.label}"
end
- expose :detailed_status,
- as: :status,
- with: StatusEntity
+ expose :groups,
+ if: -> (_, opts) { opts[:grouped] },
+ with: JobGroupEntity
+
+ expose :detailed_status, as: :status, with: StatusEntity
expose :path do |stage|
namespace_project_pipeline_path(
@@ -33,6 +35,6 @@ class StageEntity < Grape::Entity
alias_method :stage, :object
def detailed_status
- stage.detailed_status(request.user)
+ stage.detailed_status(request.current_user)
end
end