diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl
index 4d5d6ee49327..8b758b2ac09a 100644
--- a/templates/repo/issue/view_content/pull.tmpl
+++ b/templates/repo/issue/view_content/pull.tmpl
@@ -128,7 +128,6 @@
{{- else}}red{{end}}">{{svg "octicon-git-merge" 32}}
{{template "repo/pulls/status" .}}
- {{$canAutoMerge := false}}
{{$showGeneralMergeForm := false}}
- {{template "repo/issue/view_content/update_branch_by_merge" (dict "locale" .locale "Issue" .Issue "UpdateAllowed" .UpdateAllowed "UpdateByRebaseAllowed" .UpdateByRebaseAllowed "Link" .Link)}}
+ {{template "repo/issue/view_content/update_branch_by_merge" $}}
{{else if .Issue.PullRequest.IsChecking}}
{{svg "octicon-sync"}}
@@ -286,7 +285,7 @@
{{end}}
{{end}}
- {{template "repo/issue/view_content/update_branch_by_merge" (dict "locale" .locale "Issue" .Issue "UpdateAllowed" .UpdateAllowed "UpdateByRebaseAllowed" .UpdateByRebaseAllowed "Link" .Link)}}
+ {{template "repo/issue/view_content/update_branch_by_merge" $}}
{{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
index 49e4467dc3f4..84df244d8def 100644
--- a/templates/repo/issue/view_content/update_branch_by_merge.tmpl
+++ b/templates/repo/issue/view_content/update_branch_by_merge.tmpl
@@ -1,5 +1,4 @@
-{{$canAutoMerge := false}}
-{{if and (gt .Issue.PullRequest.CommitsBehind 0) (not .Issue.IsClosed) (not .Issue.PullRequest.IsChecking) (not .IsPullFilesConflicted) (not .IsPullRequestBroken) (not $canAutoMerge)}}
+{{if and (gt $.Issue.PullRequest.CommitsBehind 0) (not $.Issue.IsClosed) (not $.Issue.PullRequest.IsChecking) (not $.IsPullFilesConflicted) (not $.IsPullRequestBroken)}}
@@ -7,10 +6,10 @@
{{$.locale.Tr "repo.pulls.outdated_with_base_branch"}}
- {{if and .UpdateAllowed .UpdateByRebaseAllowed}}
+ {{if and $.UpdateAllowed $.UpdateByRebaseAllowed}}
{{end}}
- {{if and .UpdateAllowed (not .UpdateByRebaseAllowed)}}
-