Skip to content

Commit 7871094

Browse files
6543KN4CK3Rzeripath
authored
Use pulls in commit graph unless pulls are disabled (#15734 & #15740 & #15774) (#15775)
* Commit Graph: Pull-Requests should not link to issues (#15734) Use `/pulls` and simplify code. * reverse #15734 partial and comment (#15740) * reverse & comment * Update templates/repo/graph/commits.tmpl Co-authored-by: 6543 <[email protected]> Co-authored-by: zeripath <[email protected]> * Use pulls in commit graph unless pulls are disabled Fix #15370 Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: KN4CK3R <[email protected]> Co-authored-by: zeripath <[email protected]>
1 parent 22d700e commit 7871094

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

templates/repo/graph/commits.tmpl

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,9 @@
3333
{{range $commit.Refs}}
3434
{{$refGroup := .RefGroup}}
3535
{{if eq $refGroup "pull"}}
36-
{{if $.HidePRRefs}}
37-
{{if (containGeneric $.SelectedBranches .Name) }}
38-
<a class="ui labelled icon button basic tiny" href="{{$.RepoLink}}/issues/{{.ShortName|PathEscape}}">
39-
{{svg "octicon-git-pull-request" 16 "mr-2"}}#{{.ShortName}}
40-
</a>
41-
{{end}}
42-
{{else}}
43-
<a class="ui labelled icon button basic tiny" href="{{$.RepoLink}}/issues/{{.ShortName|PathEscape}}">
36+
{{if or (not $.HidePRRefs) (containGeneric $.SelectedBranches .Name)}}
37+
<!-- it's intended to use issues not pulls, if it's a pull you will get redirected -->
38+
<a class="ui labelled icon button basic tiny" href="{{$.RepoLink}}/{{if $.Repository.UnitEnabled $.UnitTypePullRequests}}pulls{{else}}issues{{end}}/{{.ShortName|PathEscape}}">
4439
{{svg "octicon-git-pull-request" 16 "mr-2"}}#{{.ShortName}}
4540
</a>
4641
{{end}}

0 commit comments

Comments
 (0)