gitlab-org--gitlab-foss/app/views/projects/issues/_related_branches.html.haml
Scott Hampton 2b51745394 Removed other deprecated status helpers
Updating a couple other places that were still using deprecated status.
2019-02-26 10:59:41 -07:00

14 lines
722 B
Text

- if @related_branches.any?
%h2.related-branches-title
= pluralize(@related_branches.count, 'Related Branch')
%ul.unstyled-list.related-merge-requests
- @related_branches.each do |branch|
%li
- target = @project.repository.find_branch(branch).dereferenced_target
- pipeline = @project.pipeline_for(branch, target.sha) if target
- if can?(current_user, :read_pipeline, pipeline)
%span.related-branch-ci-status
= render 'ci/status/icon', status: pipeline.detailed_status(current_user)
%span.related-branch-info
%strong
= link_to branch, project_compare_path(@project, from: @project.default_branch, to: branch), class: "ref-name"