Commit 2e9c1608 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Fix commit skipping

parent 789fe7b4
...@@ -17,10 +17,10 @@ module Ci ...@@ -17,10 +17,10 @@ module Ci
tag = origin_ref.start_with?('refs/tags/') tag = origin_ref.start_with?('refs/tags/')
commit = project.gl_project.ensure_ci_commit(sha) commit = project.gl_project.ensure_ci_commit(sha)
return false if commit.skip_ci? unless commit.skip_ci?
commit.update_committed! commit.update_committed!
commit.create_builds(ref, tag, user) commit.create_builds(ref, tag, user)
end
commit commit
end end
......
...@@ -35,7 +35,7 @@ describe Ci::MailService do ...@@ -35,7 +35,7 @@ describe Ci::MailService do
let(:project) { FactoryGirl.create(:ci_project, email_add_pusher: true) } let(:project) { FactoryGirl.create(:ci_project, email_add_pusher: true) }
let(:gl_project) { FactoryGirl.create(:empty_project, gitlab_ci_project: project) } let(:gl_project) { FactoryGirl.create(:empty_project, gitlab_ci_project: project) }
let(:commit) { FactoryGirl.create(:ci_commit, gl_project: gl_project) } let(:commit) { FactoryGirl.create(:ci_commit, gl_project: gl_project) }
let(:build) { FactoryGirl.create(:ci_build, status: :failed, commit: commit, user: user) } let(:build) { FactoryGirl.create(:ci_build, status: 'failed', commit: commit, user: user) }
before do before do
allow(mail).to receive_messages( allow(mail).to receive_messages(
...@@ -167,7 +167,7 @@ describe Ci::MailService do ...@@ -167,7 +167,7 @@ describe Ci::MailService do
end end
let(:gl_project) { FactoryGirl.create(:empty_project, gitlab_ci_project: project) } let(:gl_project) { FactoryGirl.create(:empty_project, gitlab_ci_project: project) }
let(:commit) { FactoryGirl.create(:ci_commit, gl_project: gl_project) } let(:commit) { FactoryGirl.create(:ci_commit, gl_project: gl_project) }
let(:build) { FactoryGirl.create(:ci_build, status: :failed, commit: commit, user: user) } let(:build) { FactoryGirl.create(:ci_build, status: 'failed', commit: commit, user: user) }
before do before do
allow(mail).to receive_messages( allow(mail).to receive_messages(
......
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