diff options
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/process_commit_worker.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/workers/process_commit_worker.rb b/app/workers/process_commit_worker.rb index ed39b4a1ea8..c9f6df9b56d 100644 --- a/app/workers/process_commit_worker.rb +++ b/app/workers/process_commit_worker.rb @@ -79,9 +79,10 @@ class ProcessCommitWorker # Avoid reprocessing commits that already exist in the upstream # when project is forked. This will also prevent duplicated system notes. def commit_exists_in_upstream?(project, commit_hash) - return false unless project.forked? + upstream_project = project.fork_source + + return false unless upstream_project - upstream_project = project.forked_from_project commit_id = commit_hash.with_indifferent_access[:id] upstream_project.commit(commit_id).present? end |