diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl
index 1f94001db0..dc671eb6d6 100644
--- a/templates/repo/issue/view_content/pull.tmpl
+++ b/templates/repo/issue/view_content/pull.tmpl
@@ -190,6 +190,7 @@
{{end}}
+ {{template "repo/issue/view_content/update_branch_by_merge" (dict "locale" .locale "Issue" .Issue "UpdateAllowed" .UpdateAllowed "UpdateByRebaseAllowed" .UpdateByRebaseAllowed "Link" .Link)}}
{{else if .Issue.PullRequest.IsChecking}}
{{svg "octicon-sync"}}
@@ -282,44 +283,7 @@
{{end}}
{{end}}
- {{if and (gt .Issue.PullRequest.CommitsBehind 0) (not .Issue.IsClosed) (not .Issue.PullRequest.IsChecking) (not .IsPullFilesConflicted) (not .IsPullRequestBroken) (not $canAutoMerge)}}
-
-
-
- {{svg "octicon-alert"}}
- {{$.locale.Tr "repo.pulls.outdated_with_base_branch"}}
-
-
- {{if and .UpdateAllowed .UpdateByRebaseAllowed}}
-
- {{end}}
- {{if and .UpdateAllowed (not .UpdateByRebaseAllowed)}}
-
- {{end}}
-
-
- {{end}}
+ {{template "repo/issue/view_content/update_branch_by_merge" (dict "locale" .locale "Issue" .Issue "UpdateAllowed" .UpdateAllowed "UpdateByRebaseAllowed" .UpdateByRebaseAllowed "Link" .Link)}}
{{if .Issue.PullRequest.IsEmpty}}
diff --git a/templates/repo/issue/view_content/update_branch_by_merge.tmpl b/templates/repo/issue/view_content/update_branch_by_merge.tmpl
new file mode 100644
index 0000000000..3bc8dcca97
--- /dev/null
+++ b/templates/repo/issue/view_content/update_branch_by_merge.tmpl
@@ -0,0 +1,39 @@
+{{$canAutoMerge := false}}
+{{if and (gt .Issue.PullRequest.CommitsBehind 0) (not .Issue.IsClosed) (not .Issue.PullRequest.IsChecking) (not .IsPullFilesConflicted) (not .IsPullRequestBroken) (not $canAutoMerge)}}
+
+
+
+ {{svg "octicon-alert"}}
+ {{$.locale.Tr "repo.pulls.outdated_with_base_branch"}}
+
+
+ {{if and .UpdateAllowed .UpdateByRebaseAllowed}}
+
+ {{end}}
+ {{if and .UpdateAllowed (not .UpdateByRebaseAllowed)}}
+
+ {{end}}
+
+
+{{end}}