Skip to content
Snippets Groups Projects
Commit cbdee053 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

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
parents cacc70da ca6fd0a2
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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)
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -10,7 +10,8 @@
%span CI build #{status}
for #{@merge_request.last_commit_short_sha}.
%span.ci-coverage
= link_to "View build details", ci_build_details_path(@merge_request), :"data-no-turbolink" => "data-no-turbolink"
- if ci_build_details_path(@merge_request)
= link_to "View build details", ci_build_details_path(@merge_request), :"data-no-turbolink" => "data-no-turbolink"
 
.ci_widget
= icon("spinner spin")
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment