Commit e9655986 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'merge-request-widget' into 'master'

Fix missing commit status for widget when no CI service is enabled

Fix for #3082 

/cc @dzaporozhets 

See merge request !1621
parents f7140dcc 6909b309
- if @merge_request.has_ci? - ci_commit = @merge_request.source_project.ci_commit(@merge_request.source_sha)
- ci_commit = @merge_request.source_project.ci_commit(@merge_request.source_sha) - if ci_commit
- if ci_commit
- status = ci_commit.status - status = ci_commit.status
.mr-widget-heading .mr-widget-heading
.ci_widget{class: "ci-#{status}"} .ci_widget{class: "ci-#{status}"}
...@@ -10,7 +9,7 @@ ...@@ -10,7 +9,7 @@
%span.ci-coverage %span.ci-coverage
= link_to "View build details", ci_status_path(ci_commit) = link_to "View build details", ci_status_path(ci_commit)
- else - elsif @merge_request.has_ci?
- # Compatibility with old CI integrations (ex jenkins) when you request status from CI server via AJAX - # Compatibility with old CI integrations (ex jenkins) when you request status from CI server via AJAX
- # Remove in later versions when services like Jenkins will set CI status via Commit status API - # Remove in later versions when services like Jenkins will set CI status via Commit status API
.mr-widget-heading .mr-widget-heading
......
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