]> source.dussan.org Git - gitea.git/commitdiff
Use pulls in commit graph unless pulls are disabled (#15774)
authorzeripath <art27@cantab.net>
Fri, 7 May 2021 18:10:30 +0000 (19:10 +0100)
committerGitHub <noreply@github.com>
Fri, 7 May 2021 18:10:30 +0000 (20:10 +0200)
Fix #15370

Signed-off-by: Andrew Thornton <art27@cantab.net>
templates/repo/graph/commits.tmpl

index bf67596bc6584fb3f97dbb804feb48d05d5ded79..3427aed58ca7009f8979c7d623af9f6d56a7d3e6 100644 (file)
@@ -35,7 +35,7 @@
                                                        {{if eq $refGroup "pull"}}
                                                                {{if or (not $.HidePRRefs) (containGeneric $.SelectedBranches .Name)}}
                                                                        <!-- it's intended to use issues not pulls, if it's a pull you will get redirected -->
-                                                                       <a class="ui labelled icon button basic tiny" href="{{$.RepoLink}}/issues/{{.ShortName|PathEscape}}">
+                                                                       <a class="ui labelled icon button basic tiny" href="{{$.RepoLink}}/{{if $.Repository.UnitEnabled $.UnitTypePullRequests}}pulls{{else}}issues{{end}}/{{.ShortName|PathEscape}}">
                                                                                {{svg "octicon-git-pull-request" 16 "mr-2"}}#{{.ShortName}}
                                                                        </a>
                                                                {{end}}