diff options
-rw-r--r-- | app/workers/process_commit_worker.rb | 4 | ||||
-rw-r--r-- | spec/workers/process_commit_worker_spec.rb | 8 |
2 files changed, 1 insertions, 11 deletions
diff --git a/app/workers/process_commit_worker.rb b/app/workers/process_commit_worker.rb index 8b192aa74c6..fe6a49976e0 100644 --- a/app/workers/process_commit_worker.rb +++ b/app/workers/process_commit_worker.rb @@ -25,8 +25,6 @@ class ProcessCommitWorker commit = build_commit(project, commit_hash) - return unless commit.matches_cross_reference_regex? - author = commit.author || user process_commit_message(project, commit, user, author, default) @@ -80,7 +78,7 @@ class ProcessCommitWorker private - # Avoid to re-process commits messages that already exists in the upstream + # 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? diff --git a/spec/workers/process_commit_worker_spec.rb b/spec/workers/process_commit_worker_spec.rb index 12b6d567b8e..4e036285e8c 100644 --- a/spec/workers/process_commit_worker_spec.rb +++ b/spec/workers/process_commit_worker_spec.rb @@ -20,14 +20,6 @@ describe ProcessCommitWorker do worker.perform(project.id, -1, commit.to_hash) end - it 'does not process the commit when no issues are referenced' do - allow(worker).to receive(:build_commit).and_return(double(matches_cross_reference_regex?: false)) - - expect(worker).not_to receive(:process_commit_message) - - worker.perform(project.id, user.id, commit.to_hash) - end - it 'processes the commit message' do expect(worker).to receive(:process_commit_message).and_call_original |