diff options
Diffstat (limited to 'app/models/gpg_signature.rb')
-rw-r--r-- | app/models/gpg_signature.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/gpg_signature.rb b/app/models/gpg_signature.rb index 46cac1d41bb..0c36e51120f 100644 --- a/app/models/gpg_signature.rb +++ b/app/models/gpg_signature.rb @@ -23,6 +23,8 @@ class GpgSignature < ApplicationRecord validates :project_id, presence: true validates :gpg_key_primary_keyid, presence: true + scope :by_commit_sha, ->(shas) { where(commit_sha: shas) } + def self.with_key_and_subkeys(gpg_key) subkey_ids = gpg_key.subkeys.pluck(:id) |