summaryrefslogtreecommitdiff
path: root/app/helpers/git_helper.rb
blob: 5edc6dcf454c619ae4d7dc2f20bec99b00527452 (plain)
1
2
3
4
5
6
7
8
9
10
11
# frozen_string_literal: true

module GitHelper
  def strip_gpg_signature(text)
    text.gsub(/-----BEGIN PGP SIGNATURE-----(.*)-----END PGP SIGNATURE-----/m, "")
  end

  def short_sha(text)
    Commit.truncate_sha(text)
  end
end