2022-08-27 11:52:29 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
module Ssh
|
|
|
|
class Commit < Gitlab::SignedCommit
|
|
|
|
private
|
|
|
|
|
|
|
|
def signature_class
|
|
|
|
CommitSignatures::SshSignature
|
|
|
|
end
|
|
|
|
|
|
|
|
def attributes
|
|
|
|
signature = ::Gitlab::Ssh::Signature.new(signature_text, signed_text, @commit.committer_email)
|
|
|
|
|
|
|
|
{
|
|
|
|
commit_sha: @commit.sha,
|
|
|
|
project: @commit.project,
|
|
|
|
key_id: signature.signed_by_key&.id,
|
2023-03-17 16:20:25 +05:30
|
|
|
key_fingerprint_sha256: signature.key_fingerprint,
|
|
|
|
user_id: signature.signed_by_key&.user_id,
|
2022-08-27 11:52:29 +05:30
|
|
|
verification_status: signature.verification_status
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|