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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
406 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, "")
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