Skip to content

Commit

Permalink
Use correct pull request commit link instead of a generic commit link (
Browse files Browse the repository at this point in the history
…#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>
  • Loading branch information
lunny and GiteaBot authored Aug 13, 2023
1 parent 7018659 commit ca74b07
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions templates/repo/commits_list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand All @@ -54,6 +56,8 @@
{{end}}
{{if $.PageIsWiki}}
</a>
{{else if $.PageIsPullCommits}}
</a>
{{else if $.Reponame}}
</a>
{{else}}
Expand Down

0 comments on commit ca74b07

Please sign in to comment.