diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
commit | 0653e08efd039a5905f3fa4f6e9cef9f5d2f799c (patch) | |
tree | 4dcc884cf6d81db44adae4aa99f8ec1233a41f55 /lib/gitlab/signed_tag.rb | |
parent | 744144d28e3e7fddc117924fef88de5d9674fe4c (diff) |
Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42
Diffstat (limited to 'lib/gitlab/signed_tag.rb')
-rw-r--r-- | lib/gitlab/signed_tag.rb | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/lib/gitlab/signed_tag.rb b/lib/gitlab/signed_tag.rb index 3b22cb7622d..49194300a39 100644 --- a/lib/gitlab/signed_tag.rb +++ b/lib/gitlab/signed_tag.rb @@ -7,12 +7,7 @@ module Gitlab def initialize(repository, tag) @repository = repository @tag = tag - - if Feature.enabled?(:get_tag_signatures) - @signature_data = Gitlab::Git::Tag.extract_signature_lazily(repository, tag.id) if repository - else - @signature_data = [signature_text_of_message.b, signed_text_of_message.b] - end + @signature_data = Gitlab::Git::Tag.extract_signature_lazily(repository, tag.id) if repository end def signature @@ -26,22 +21,5 @@ module Gitlab def signed_text @signature_data&.fetch(1) end - - private - - def signature_text_of_message - @tag.message.slice(@tag.message.index("-----BEGIN SIGNED MESSAGE-----")..-1) - rescue StandardError - nil - end - - def signed_text_of_message - %{object #{@tag.target_commit.id} -type commit -tag #{@tag.name} -tagger #{@tag.tagger.name} <#{@tag.tagger.email}> #{@tag.tagger.date.seconds} #{@tag.tagger.timezone} - -#{@tag.message.gsub(/-----BEGIN SIGNED MESSAGE-----(.*)-----END SIGNED MESSAGE-----/m, "")}} - end end end |