diff options
author | Robert Speicher <robert@gitlab.com> | 2018-08-03 04:37:44 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2018-08-03 04:37:44 +0300 |
commit | f6e6b920bbcbb01bd8a1781f0740b47da9297ee6 (patch) | |
tree | 83411cf99e481187fd1f61444f0bab95be56a58c /app/workers | |
parent | 7da6ac06449eaf6a5385c3f5c24c5217731aa213 (diff) | |
parent | 3fda119ea35a76bc07accfdacee55cb5b6c880cf (diff) |
Merge branch 'sh-fix-failing-gpg-signature-ce' into 'master'
Make CreateGpgSignatureWorker backwards compatible with original method signature (CE port)
See merge request gitlab-org/gitlab-ce!20998
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/create_gpg_signature_worker.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/workers/create_gpg_signature_worker.rb b/app/workers/create_gpg_signature_worker.rb index 91833941070..a1aeeb7c4fc 100644 --- a/app/workers/create_gpg_signature_worker.rb +++ b/app/workers/create_gpg_signature_worker.rb @@ -4,6 +4,10 @@ class CreateGpgSignatureWorker include ApplicationWorker def perform(commit_shas, project_id) + # Older versions of GitPushService may push a single commit ID on the stack. + # We need this to be backwards compatible. + commit_shas = Array(commit_shas) + return if commit_shas.empty? project = Project.find_by(id: project_id) |