Commit 1c042734 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch 'feat/tagger' into 'master'

Add tagger within tag view

See merge request gitlab-org/gitlab!19681
parents ec8fb7cb b026473a
# frozen_string_literal: true # frozen_string_literal: true
module GitHelper module GitHelper
def strip_gpg_signature(text) def strip_signature(text)
text.gsub(/-----BEGIN PGP SIGNATURE-----(.*)-----END PGP SIGNATURE-----/m, "") text.gsub(/-----BEGIN PGP SIGNATURE-----(.*)-----END PGP SIGNATURE-----/m, "")
text.gsub(/-----BEGIN PGP MESSAGE-----(.*)-----END PGP MESSAGE-----/m, "")
text.gsub(/-----BEGIN SIGNED MESSAGE-----(.*)-----END SIGNED MESSAGE-----/m, "")
end end
def short_sha(text) def short_sha(text)
......
...@@ -7,7 +7,7 @@ if commit ...@@ -7,7 +7,7 @@ if commit
xml.id tag_url xml.id tag_url
xml.link href: tag_url xml.link href: tag_url
xml.title truncate(tag.name, length: 80) xml.title truncate(tag.name, length: 80)
xml.summary strip_gpg_signature(tag.message) xml.summary strip_signature(tag.message)
xml.content markdown_field(release, :description), type: 'html' xml.content markdown_field(release, :description), type: 'html'
xml.updated release.updated_at.xmlschema if release xml.updated release.updated_at.xmlschema if release
xml.media :thumbnail, width: '40', height: '40', url: image_url(avatar_icon_for_email(commit.author_email)) xml.media :thumbnail, width: '40', height: '40', url: image_url(avatar_icon_for_email(commit.author_email))
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
- if tag.message.present? - if tag.message.present?
   
= strip_gpg_signature(tag.message) = strip_signature(tag.message)
- if commit - if commit
.block-truncated .block-truncated
......
- user = user_email = nil
- if @tag.tagger
- user_email = @tag.tagger.email
- user = User.find_by_any_email(user_email)
- add_to_breadcrumbs s_('TagsPage|Tags'), project_tags_path(@project) - add_to_breadcrumbs s_('TagsPage|Tags'), project_tags_path(@project)
- breadcrumb_title @tag.name - breadcrumb_title @tag.name
- page_title @tag.name, s_('TagsPage|Tags') - page_title @tag.name, s_('TagsPage|Tags')
...@@ -11,6 +15,24 @@ ...@@ -11,6 +15,24 @@
- if protected_tag?(@project, @tag) - if protected_tag?(@project, @tag)
%span.badge.badge-success %span.badge.badge-success
= s_('TagsPage|protected') = s_('TagsPage|protected')
- if user
= link_to user_path(user) do
%div
= user_avatar_without_link(user: user, size: 32, css_class: "mt-1 mb-1")
%div
%strong= user.name
%div= user.to_reference
- elsif user_email
= mail_to user_email do
%div
= user_avatar_without_link(user_email: user_email, size: 32, css_class: "mt-1 mb-1")
%div{ :class => "clearfix" }
%strong= user_email
- if @commit - if @commit
= render 'projects/branches/commit', commit: @commit, project: @project = render 'projects/branches/commit', commit: @commit, project: @project
- else - else
...@@ -33,7 +55,7 @@ ...@@ -33,7 +55,7 @@
- if @tag.message.present? - if @tag.message.present?
%pre.wrap %pre.wrap
= strip_gpg_signature(@tag.message) = strip_signature(@tag.message)
.append-bottom-default.prepend-top-default .append-bottom-default.prepend-top-default
- if @release.description.present? - if @release.description.present?
......
---
title: add tagger within tag view
merge_request: 19681
author: Roger Meier
type: added
...@@ -62,6 +62,10 @@ module Gitlab ...@@ -62,6 +62,10 @@ module Gitlab
encode! @message encode! @message
end end
def tagger
@raw_tag.tagger
end
private private
def message_from_gitaly_tag def message_from_gitaly_tag
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment