gitlab-org--gitlab-foss/app/models/gpg_signature.rb

18 lines
360 B
Ruby
Raw Normal View History

class GpgSignature < ActiveRecord::Base
2017-07-20 13:44:15 +00:00
include ShaAttribute
sha_attribute :commit_sha
sha_attribute :gpg_key_primary_keyid
belongs_to :project
belongs_to :gpg_key
validates :commit_sha, presence: true
validates :project, presence: true
validates :gpg_key_primary_keyid, presence: true
2017-07-06 08:17:09 +00:00
def commit
project.commit(commit_sha)
end
end