gitlab-org--gitlab-foss/app/models/commit_signatures/x509_commit_signature.rb

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

17 lines
406 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module CommitSignatures
class X509CommitSignature < ApplicationRecord
include CommitSignature
belongs_to :x509_certificate, class_name: 'X509Certificate', foreign_key: 'x509_certificate_id', optional: false
validates :x509_certificate_id, presence: true
def x509_commit
return unless commit
Gitlab::X509::Commit.new(commit)
end
end
end