Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-21 21:29:29 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-21 21:29:29 +0300
commitcbdee053b4999f9ac029ac245f4043bd3005048d (patch)
tree6ce6d58bd39e24bfc8026d5046b9473f5e627f0e /app/models
parentcacc70daf4b61b127b778b7a6e8244ab18116a14 (diff)
parentca6fd0a27da17e927b4db7136ead01f7564baf2b (diff)
Merge branch 'fix-ci-handling' into 'master'
Fixed MR handling when GitLab CI project is not present This is copy of !1371 /cc @jacobvosmaer @vsizov @dzaporozhets See merge request !1373
Diffstat (limited to 'app/models')
-rw-r--r--app/models/project_services/gitlab_ci_service.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/models/project_services/gitlab_ci_service.rb b/app/models/project_services/gitlab_ci_service.rb
index 820dd3f567c..9e2b3bcd873 100644
--- a/app/models/project_services/gitlab_ci_service.rb
+++ b/app/models/project_services/gitlab_ci_service.rb
@@ -46,7 +46,9 @@ class GitlabCiService < CiService
end
ci_project = Ci::Project.find_by(gitlab_id: project.id)
- Ci::CreateCommitService.new.execute(ci_project, data)
+ if ci_project
+ Ci::CreateCommitService.new.execute(ci_project, data)
+ end
end
def get_ci_commit(sha, ref)
@@ -85,7 +87,9 @@ class GitlabCiService < CiService
end
def build_page(sha, ref)
- Ci::RoutesHelper.ci_project_ref_commits_path(project.gitlab_ci_project, ref, sha)
+ if project.gitlab_ci_project.present?
+ Ci::RoutesHelper.ci_project_ref_commits_path(project.gitlab_ci_project, ref, sha)
+ end
end
def title