Commit 00549635 authored by Felipe Artur's avatar Felipe Artur

Remove unecessary commit pattern check

parent e44016b9
......@@ -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?
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment