summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorKrasimir Angelov <kangelov@gitlab.com>2019-08-20 12:28:55 +0300
committerKrasimir Angelov <kangelov@gitlab.com>2019-08-20 12:39:19 +0300
commit92ac94c26e408842c6dfa44aae93e147a0f3d8f8 (patch)
tree24251ef5b17baa744cb96f5b7448c4900e196f1b /app
parent51c19691e4c4ceb60ef28fd08c6b13549a423a39 (diff)
downloadgitlab-ce-92ac94c26e408842c6dfa44aae93e147a0f3d8f8.tar.gz
Replace finished_at with deployed_at for Deployment entity56130-deployed_at
Instead of `finished_at` attribute use `deployed_at` methods which also takes into account the deployment status. Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/56130.
Diffstat (limited to 'app')
-rw-r--r--app/serializers/deployment_entity.rb2
-rw-r--r--app/serializers/deployment_serializer.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/serializers/deployment_entity.rb b/app/serializers/deployment_entity.rb
index 6e91317eb20..d6466ad1cdd 100644
--- a/app/serializers/deployment_entity.rb
+++ b/app/serializers/deployment_entity.rb
@@ -18,7 +18,7 @@ class DeploymentEntity < Grape::Entity
end
expose :created_at
- expose :finished_at
+ expose :deployed_at
expose :tag
expose :last?
expose :user, using: UserEntity
diff --git a/app/serializers/deployment_serializer.rb b/app/serializers/deployment_serializer.rb
index 3fd3e1b9cc8..b48037dd53f 100644
--- a/app/serializers/deployment_serializer.rb
+++ b/app/serializers/deployment_serializer.rb
@@ -4,7 +4,7 @@ class DeploymentSerializer < BaseSerializer
entity DeploymentEntity
def represent_concise(resource, opts = {})
- opts[:only] = [:iid, :id, :sha, :created_at, :finished_at, :tag, :last?, :id, ref: [:name]]
+ opts[:only] = [:iid, :id, :sha, :created_at, :deployed_at, :tag, :last?, :id, ref: [:name]]
represent(resource, opts)
end
end