Use detailed CI/CD statuses to render commit status
Description
Code responsible for showing CI/CD status for a commit still uses legacy approach to render a status. We should use new detailed CI/CD status presenters to avoid problems like the one presented below.
Proposal
Instead of using code like
- status = commit.status(ref)
- if status
= link_to pipelines_namespace_project_commit_path(commit.project.namespace, commit.project, commit), class: "ci-status ci-#{status}" do
= ci_icon_for_status(status)
= ci_label_for_status(status)
in _last_commit.html.haml, add a Commit#detailed_status
method and use it to render status _badge.html.haml
.
/cc @ayufan