]> source.dussan.org Git - gitea.git/commitdiff
fix: issue tracker link redirection (#13504)
authorwULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf <61180606+wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf@users.noreply.github.com>
Tue, 10 Nov 2020 21:27:11 +0000 (22:27 +0100)
committerGitHub <noreply@github.com>
Tue, 10 Nov 2020 21:27:11 +0000 (23:27 +0200)
kudos to @zeripath
* in case there is a remote issue tracker configured, the git graph view
  PR and issue links now correctly point to the issue tracker location,
  whereas if literally pointing at 'pulls', you could have ended up back
  at the local instance after clicking the link (which, obviously haven't
  had the pull/issue)

Signed-off-by: wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf <a_mirre@utb.cz>
templates/repo/graph/commits.tmpl

index 108aa0aa04a565f62b9de9b8ac1a7ab1b3d0fc05..d89bcf1cc7f4b79567f00b7b3852e892813abaf1 100644 (file)
                                                        {{if eq $refGroup "pull"}}
                                                                {{if $.HidePRRefs}}
                                                                        {{if (containGeneric $.SelectedBranches .Name) }}
-                                                                               <a class="ui labelled icon button basic tiny" href="{{$.RepoLink}}/pulls/{{.ShortName|PathEscape}}">
+                                                                               <a class="ui labelled icon button basic tiny" href="{{$.RepoLink}}/issues/{{.ShortName|PathEscape}}">
                                                                                        {{svg "octicon-git-pull-request" 16 "mr-2"}}#{{.ShortName}}
                                                                                </a>
                                                                        {{end}}
                                                                {{else}}
-                                                                       <a class="ui labelled icon button basic tiny" href="{{$.RepoLink}}/pulls/{{.ShortName|PathEscape}}">
+                                                                       <a class="ui labelled icon button basic tiny" href="{{$.RepoLink}}/issues/{{.ShortName|PathEscape}}">
                                                                                {{svg "octicon-git-pull-request" 16 "mr-2"}}#{{.ShortName}}
                                                                        </a>
                                                                {{end}}