diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-19 06:10:50 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-19 06:10:50 +0000 |
commit | b8f44765693d6f6e4c8df6ab7b7c7b1141f83b26 (patch) | |
tree | 85d95eb57e7ee5a230d63e5e7f00e1c9c55ebcd4 /lib/gitlab/git/wiki_page_version.rb | |
parent | bd1944e6cc35261fac30affee839dfc6de0e1667 (diff) | |
download | gitlab-ce-b8f44765693d6f6e4c8df6ab7b7c7b1141f83b26.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/git/wiki_page_version.rb')
-rw-r--r-- | lib/gitlab/git/wiki_page_version.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/gitlab/git/wiki_page_version.rb b/lib/gitlab/git/wiki_page_version.rb index 475a9d4d1b9..efe39fa852c 100644 --- a/lib/gitlab/git/wiki_page_version.rb +++ b/lib/gitlab/git/wiki_page_version.rb @@ -10,7 +10,12 @@ module Gitlab @format = format end - delegate :message, :sha, :id, :author_name, :authored_date, to: :commit + delegate :message, :sha, :id, :author_name, :author_email, :authored_date, to: :commit + + def author_url + user = ::User.find_by_any_email(author_email) + user.nil? ? "mailto:#{author_email}" : Gitlab::UrlBuilder.build(user) + end end end end |