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>2019-11-07 03:06:18 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-07 03:06:18 +0300
commitee6b185429b62857a5e490526095a7699e8539f3 (patch)
treede54f53b76c5da2bf05cbd333e1910bbe655d653 /lib/gitlab/data_builder
parentcf85de264d049f1f8ff14b23f38f8331ae4c60fa (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/data_builder')
-rw-r--r--lib/gitlab/data_builder/deployment.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/gitlab/data_builder/deployment.rb b/lib/gitlab/data_builder/deployment.rb
index f11e032ab84..70587b3132a 100644
--- a/lib/gitlab/data_builder/deployment.rb
+++ b/lib/gitlab/data_builder/deployment.rb
@@ -6,11 +6,17 @@ module Gitlab
extend self
def build(deployment)
+ # Deployments will not have a deployable when created using the API.
+ deployable_url =
+ if deployment.deployable
+ Gitlab::UrlBuilder.build(deployment.deployable)
+ end
+
{
object_kind: 'deployment',
status: deployment.status,
deployable_id: deployment.deployable_id,
- deployable_url: Gitlab::UrlBuilder.build(deployment.deployable),
+ deployable_url: deployable_url,
environment: deployment.environment.name,
project: deployment.project.hook_attrs,
short_sha: deployment.short_sha,