diff options
author | Krasimir Angelov <kangelov@gitlab.com> | 2019-08-20 13:29:16 +0300 |
---|---|---|
committer | Krasimir Angelov <kangelov@gitlab.com> | 2019-08-22 15:36:55 +0300 |
commit | d86b77bf20474702631d5fd89177c54a9f928760 (patch) | |
tree | 3a1fcdc0eda151cb1e9b9a391e6a68df43060c02 /app/serializers/deployment_entity.rb | |
parent | 51c19691e4c4ceb60ef28fd08c6b13549a423a39 (diff) |
Extract logic who created deployment into Deployment#deployed_by
Prefer the deployable user over the deployment user.
Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/66037.
Diffstat (limited to 'app/serializers/deployment_entity.rb')
-rw-r--r-- | app/serializers/deployment_entity.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/serializers/deployment_entity.rb b/app/serializers/deployment_entity.rb index 6e91317eb20..7e91bcf18bc 100644 --- a/app/serializers/deployment_entity.rb +++ b/app/serializers/deployment_entity.rb @@ -21,7 +21,7 @@ class DeploymentEntity < Grape::Entity expose :finished_at expose :tag expose :last? - expose :user, using: UserEntity + expose :deployed_by, as: :user, using: UserEntity expose :deployable do |deployment, opts| deployment.deployable.yield_self do |deployable| |