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:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-09-21 14:53:03 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2015-09-21 14:53:03 +0300
commit3abcab779ec3015914eda5d715b4a9588445d815 (patch)
tree3d4fcc4ae6ed3ee0f8a7580985ae7bd0daf6903d /app/models
parent183892fde98308c0d77f5ba7a9bdb23d79eebe43 (diff)
Fixed MR handling when GitLab CI project is not present
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