diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-15 09:08:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-15 09:08:54 +0300 |
commit | 98bec8db98213f35570a985b4388e5958bc21e5c (patch) | |
tree | 405a7363e718f891d1b1036924e2cc73de875fff /lib/gitlab/data_builder | |
parent | 9ee7e62c298a27d7f02d53b936d2027a079435dc (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/data_builder')
-rw-r--r-- | lib/gitlab/data_builder/deployment.rb | 9 |
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 |