2018-08-18 07:19:57 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2014-11-18 11:00:38 -05:00
|
|
|
module GitHelper
|
2019-11-25 07:06:13 -05:00
|
|
|
def strip_signature(text)
|
2019-12-08 19:07:44 -05:00
|
|
|
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
|
2014-11-18 11:00:38 -05:00
|
|
|
end
|
2016-09-01 08:23:39 -04:00
|
|
|
|
|
|
|
def short_sha(text)
|
2016-09-06 13:08:06 -04:00
|
|
|
Commit.truncate_sha(text)
|
2016-09-01 08:23:39 -04:00
|
|
|
end
|
2014-11-18 11:00:38 -05:00
|
|
|
end
|