Skip to content

Commit 66f8da5

Browse files
Use pulls url if issue is a pull request (#16230)
if a pull request is displayed use the /pulls path if a pull requests diff is displayed use the /pulls/{id}/files url if an issue is displayed use the issues url Fixes #16102 Signed-off-by: Sebastian Sauer <[email protected]>
1 parent d55b5eb commit 66f8da5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

templates/repo/issue/view_content/context_menu.tmpl

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
<div class="menu">
77
{{ $referenceUrl := "" }}
88
{{ if .issue }}
9-
{{ $referenceUrl = Printf "%s%s/issues/%d#%s" AppUrl .ctx.Repository.FullName .ctx.Issue.Index .item.HashTag }}
9+
{{ if .ctx.Issue.IsPull}}
10+
{{ $referenceUrl = Printf "%s%s/pulls/%d#%s" AppUrl .ctx.Repository.FullName .ctx.Issue.Index .item.HashTag }}
11+
{{ else }}
12+
{{ $referenceUrl = Printf "%s%s/issues/%d#%s" AppUrl .ctx.Repository.FullName .ctx.Issue.Index .item.HashTag }}
13+
{{ end }}
1014
{{ else }}
1115
{{ $referenceUrl = Printf "%s%s/pulls/%d/files#%s" AppUrl .ctx.Repository.FullName .ctx.Issue.Index .item.HashTag }}
1216
{{ end }}

0 commit comments

Comments
 (0)