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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-04-15 09:08:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-15 09:08:54 +0300
commit98bec8db98213f35570a985b4388e5958bc21e5c (patch)
tree405a7363e718f891d1b1036924e2cc73de875fff /lib/gitlab/data_builder
parent9ee7e62c298a27d7f02d53b936d2027a079435dc (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/data_builder')
-rw-r--r--lib/gitlab/data_builder/deployment.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/gitlab/data_builder/deployment.rb b/lib/gitlab/data_builder/deployment.rb
index f77a6339eee..0e6841e10a7 100644
--- a/lib/gitlab/data_builder/deployment.rb
+++ b/lib/gitlab/data_builder/deployment.rb
@@ -17,6 +17,11 @@ module Gitlab
Gitlab::UrlBuilder.build(commit)
end
+ user_url =
+ if deployment.deployed_by
+ Gitlab::UrlBuilder.build(deployment.deployed_by)
+ end
+
{
object_kind: 'deployment',
status: deployment.status,
@@ -27,8 +32,8 @@ module Gitlab
environment: deployment.environment.name,
project: deployment.project.hook_attrs,
short_sha: deployment.short_sha,
- user: deployment.deployed_by.hook_attrs,
- user_url: Gitlab::UrlBuilder.build(deployment.deployed_by),
+ user: deployment.deployed_by&.hook_attrs,
+ user_url: user_url,
commit_url: commit_url,
commit_title: deployment.commit_title,
ref: deployment.ref