提交 4a8a8282 编写于 作者: R Rémy Coutable

Fix an issue when the target branch of a MR had been deleted

Before displaying the "diverged commits" note, we're checking if the MR
is open, but we should check if it's mergeable instead because this
check ensure the source and target branches exist.

This was introduced by !2217 and fixes #14388.
上级 eba00325
......@@ -43,6 +43,7 @@ v 8.6.0 (unreleased)
- Increase the notes polling timeout over time (Roberto Dip)
- Add shortcut to toggle markdown preview (Florent Baldino)
- Show labels in dashboard and group milestone views
- Fix an issue when the target branch of a MR had been deleted
- Add main language of a project in the list of projects (Tiago Botelho)
- Add #upcoming filter to Milestone filter (Tiago Botelho)
- Add ability to show archived projects on dashboard, explore and group pages
......
......@@ -34,7 +34,7 @@
%span into
= link_to namespace_project_commits_path(@project.namespace, @project, @merge_request.target_branch), class: "label-branch" do
= @merge_request.target_branch
- if @merge_request.open? && @merge_request.diverged_from_target_branch?
- if @merge_request.mergeable? && @merge_request.diverged_from_target_branch?
%span (#{pluralize(@merge_request.diverged_commits_count, 'commit')} behind)
= render "projects/merge_requests/show/how_to_merge"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册