diff options
author | Jason Goodman <jgoodman@gitlab.com> | 2019-05-02 16:07:26 +0000 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2019-05-02 16:07:26 +0000 |
commit | 1b8646804d323d1a919c0150511168f8b6ef41d1 (patch) | |
tree | e566308e3b8dc3b19b62c1be2c239ee00d3e04af /lib | |
parent | f1526ccd5859f29bf054202a53a371e25c1dcb10 (diff) | |
download | gitlab-ce-1b8646804d323d1a919c0150511168f8b6ef41d1.tar.gz |
Update deployment chat message notification
Include link to user and commit title.
Rearrange text
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/data_builder/deployment.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/url_builder.rb | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/data_builder/deployment.rb b/lib/gitlab/data_builder/deployment.rb index 26705dd1f6f..f11e032ab84 100644 --- a/lib/gitlab/data_builder/deployment.rb +++ b/lib/gitlab/data_builder/deployment.rb @@ -15,7 +15,9 @@ module Gitlab project: deployment.project.hook_attrs, short_sha: deployment.short_sha, user: deployment.user.hook_attrs, - commit_url: Gitlab::UrlBuilder.build(deployment.commit) + user_url: Gitlab::UrlBuilder.build(deployment.user), + commit_url: Gitlab::UrlBuilder.build(deployment.commit), + commit_title: deployment.commit.title } end end diff --git a/lib/gitlab/url_builder.rb b/lib/gitlab/url_builder.rb index 169ce8ab026..42cf1ec1f0e 100644 --- a/lib/gitlab/url_builder.rb +++ b/lib/gitlab/url_builder.rb @@ -32,6 +32,8 @@ module Gitlab milestone_url(object) when ::Ci::Build project_job_url(object.project, object) + when User + user_url(object) else raise NotImplementedError.new("No URL builder defined for #{object.class}") end |