no need for passing parameter
we introduced memoizing, so it's safe to call the method multiple times.
This commit is contained in:
parent
e75ab06430
commit
d7f4264368
1 changed files with 4 additions and 4 deletions
|
@ -32,7 +32,7 @@ module Gitlab
|
||||||
def update_signature!(cached_signature)
|
def update_signature!(cached_signature)
|
||||||
using_keychain do |gpg_key|
|
using_keychain do |gpg_key|
|
||||||
cached_signature.update_attributes!(
|
cached_signature.update_attributes!(
|
||||||
valid_signature: self.class.gpg_signature_valid_signature_value(gpg_key, verified_signature)
|
valid_signature: gpg_signature_valid_signature_value(gpg_key)
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -67,12 +67,12 @@ module Gitlab
|
||||||
project: commit.project,
|
project: commit.project,
|
||||||
gpg_key: gpg_key,
|
gpg_key: gpg_key,
|
||||||
gpg_key_primary_keyid: gpg_key&.primary_keyid || verified_signature.fingerprint,
|
gpg_key_primary_keyid: gpg_key&.primary_keyid || verified_signature.fingerprint,
|
||||||
valid_signature: self.class.gpg_signature_valid_signature_value(gpg_key, verified_signature)
|
valid_signature: gpg_signature_valid_signature_value(gpg_key)
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.gpg_signature_valid_signature_value(gpg_key, verified_signature_)
|
def gpg_signature_valid_signature_value(gpg_key)
|
||||||
!!(gpg_key && gpg_key.verified? && verified_signature_.valid?)
|
!!(gpg_key && gpg_key.verified? && verified_signature.valid?)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue