Module: GitHelper
- Included in:
- MergeRequestDiffEntity
- Defined in:
- app/helpers/git_helper.rb
Instance Method Summary collapse
Instance Method Details
#short_sha(text) ⇒ Object
10 11 12 |
# File 'app/helpers/git_helper.rb', line 10 def short_sha(text) Commit.truncate_sha(text) end |
#strip_signature(text) ⇒ Object
4 5 6 7 8 |
# File 'app/helpers/git_helper.rb', line 4 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.gsub(/-----BEGIN SIGNED MESSAGE-----(.*)-----END SIGNED MESSAGE-----/m, "") end |