summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-10-12 16:35:58 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2015-10-12 16:35:58 +0200
commit2e9c1608e56a20b93608ddcd569c6a45d3a229eb (patch)
tree122664b86251a576a7d86c8b9b132944169433e5
parent789fe7b4899fb97c48ad363c5ecb1969d78d1536 (diff)
downloadgitlab-ce-2e9c1608e56a20b93608ddcd569c6a45d3a229eb.tar.gz
Fix commit skipping
-rw-r--r--app/services/ci/create_commit_service.rb10
-rw-r--r--spec/models/ci/project_services/mail_service_spec.rb4
2 files changed, 7 insertions, 7 deletions
diff --git a/app/services/ci/create_commit_service.rb b/app/services/ci/create_commit_service.rb
index 0ae35387579..79b0291fabc 100644
--- a/app/services/ci/create_commit_service.rb
+++ b/app/services/ci/create_commit_service.rb
@@ -17,11 +17,11 @@ module Ci
tag = origin_ref.start_with?('refs/tags/')
commit = project.gl_project.ensure_ci_commit(sha)
- return false if commit.skip_ci?
-
- commit.update_committed!
- commit.create_builds(ref, tag, user)
-
+ unless commit.skip_ci?
+ commit.update_committed!
+ commit.create_builds(ref, tag, user)
+ end
+
commit
end
end
diff --git a/spec/models/ci/project_services/mail_service_spec.rb b/spec/models/ci/project_services/mail_service_spec.rb
index 2ce5c2b4707..d9b3d34ff15 100644
--- a/spec/models/ci/project_services/mail_service_spec.rb
+++ b/spec/models/ci/project_services/mail_service_spec.rb
@@ -35,7 +35,7 @@ describe Ci::MailService do
let(:project) { FactoryGirl.create(:ci_project, email_add_pusher: true) }
let(:gl_project) { FactoryGirl.create(:empty_project, gitlab_ci_project: 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
allow(mail).to receive_messages(
@@ -167,7 +167,7 @@ describe Ci::MailService do
end
let(:gl_project) { FactoryGirl.create(:empty_project, gitlab_ci_project: 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
allow(mail).to receive_messages(