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, "")
|
2021-04-29 21:17:54 +05:30
|
|
|
text.gsub(/-----BEGIN SIGNED MESSAGE-----(.*)-----END SIGNED MESSAGE-----/m, "")
|
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
|