debian-mirror-gitlab/app/helpers/git_helper.rb

15 lines
422 B
Ruby
Raw Normal View History

2018-12-05 23:21:45 +05:30
# frozen_string_literal: true
2015-04-26 12:48:37 +05:30
module GitHelper
2020-01-01 13:55:28 +05:30
def strip_signature(text)
text = text.gsub(/-----BEGIN PGP SIGNATURE-----(.*)-----END PGP SIGNATURE-----/m, "")
text = text.gsub(/-----BEGIN PGP MESSAGE-----(.*)-----END PGP MESSAGE-----/m, "")
text = text.gsub(/-----BEGIN SIGNED MESSAGE-----(.*)-----END SIGNED MESSAGE-----/m, "")
text
2015-04-26 12:48:37 +05:30
end
2016-09-29 09:46:39 +05:30
def short_sha(text)
Commit.truncate_sha(text)
end
2015-04-26 12:48:37 +05:30
end