gitlab-org--gitlab-foss/app/workers/create_gpg_signature_worker.rb
Alexis Reigel 508ff17b34 pass whole commit to Gitlab::Gpg::Commit again
we need the commit object for the updated verification that also checks
the committer's email to match the gpg key and user's emails.
2017-09-05 12:18:31 +02:00

16 lines
387 B
Ruby

class CreateGpgSignatureWorker
include Sidekiq::Worker
include DedicatedSidekiqQueue
def perform(commit_sha, project_id)
project = Project.find_by(id: project_id)
return unless project
commit = project.commit(commit_sha)
return unless commit
# This calculates and caches the signature in the database
Gitlab::Gpg::Commit.new(commit).signature
end
end