0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-22 23:33:15 -05:00

Use correct pull request commit link instead of a generic commit link (#26434)

Replace #26197
Since #25528 merged, the links of pull request commits should be
redirect to pull file changes UI but not the generic one.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
Lunny Xiao 2023-08-13 17:04:42 +08:00 committed by GitHub
parent 7018659a1d
commit ca74b074ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,6 +43,8 @@
{{end}}
{{if $.PageIsWiki}}
<a href="{{$commitRepoLink}}/wiki/commit/{{.ID}}" rel="nofollow" class="{{$class}}">
{{else if $.PageIsPullCommits}}
<a href="{{$commitRepoLink}}/pulls/{{$.Issue.Index}}/commits/{{.ID}}" rel="nofollow" class="{{$class}}">
{{else if $.Reponame}}
<a href="{{$commitRepoLink}}/commit/{{.ID}}" rel="nofollow" class="{{$class}}">
{{else}}
@ -54,6 +56,8 @@
{{end}}
{{if $.PageIsWiki}}
</a>
{{else if $.PageIsPullCommits}}
</a>
{{else if $.Reponame}}
</a>
{{else}}