summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@gitlab.com>2014-11-18 17:24:23 +0000
committerDmitriy Zaporozhets <dzaporozhets@gitlab.com>2014-11-18 17:24:23 +0000
commit0dcc9f39be64944938444e264b08bad98cb55068 (patch)
tree641628867ed07d7c0a71bd30f94f55ea833b9b98
parentfe46a5c0847007b2e6e36addc3e1f09a3e837390 (diff)
parentf9aead9f6e7e477236a51fa4eab3a6cba5dd2331 (diff)
downloadgitlab-ce-0dcc9f39be64944938444e264b08bad98cb55068.tar.gz
Merge branch 'hide-gpg-signature' into 'master'
Hide gpg signature Fixes #1743 See merge request !1263
-rw-r--r--app/helpers/git_helper.rb5
-rw-r--r--app/views/projects/tags/_tag.html.haml2
2 files changed, 6 insertions, 1 deletions
diff --git a/app/helpers/git_helper.rb b/app/helpers/git_helper.rb
new file mode 100644
index 00000000000..09684955233
--- /dev/null
+++ b/app/helpers/git_helper.rb
@@ -0,0 +1,5 @@
+module GitHelper
+ def strip_gpg_signature(text)
+ text.gsub(/-----BEGIN PGP SIGNATURE-----(.*)-----END PGP SIGNATURE-----/m, "")
+ end
+end
diff --git a/app/views/projects/tags/_tag.html.haml b/app/views/projects/tags/_tag.html.haml
index f93c1b4211f..4ab102ba96c 100644
--- a/app/views/projects/tags/_tag.html.haml
+++ b/app/views/projects/tags/_tag.html.haml
@@ -6,7 +6,7 @@
= tag.name
- if tag.message.present?
&nbsp;
- = tag.message
+ = strip_gpg_signature(tag.message)
.pull-right
- if can? current_user, :download_code, @project
= render 'projects/repositories/download_archive', ref: tag.name, btn_class: 'btn-grouped btn-group-small'