Skip to content

Commit 7609f2f

Browse files
Link to existing PR when trying to open a new PR on the same branches (#25494)
when trying to create a PR for an existing PRs branch combination link to the PR directly and not just to the repo. Before: ![image](https://github.com/go-gitea/gitea/assets/1135157/b6c71323-29c8-4024-afa5-420eed145e91) After: ![image](https://github.com/go-gitea/gitea/assets/1135157/837665f5-7459-46c6-86d4-c2dbedabc262)
1 parent 323c6cb commit 7609f2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/repo/diff/compare.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192
{{if .HasPullRequest}}
193193
<div class="ui segment grid title">
194194
<div class="twelve wide column issue-title">
195-
{{.locale.Tr "repo.pulls.has_pull_request" (Escape $.RepoLink) (Escape $.RepoRelPath) .PullRequest.Index | Safe}}
195+
{{.locale.Tr "repo.pulls.has_pull_request" (print (Escape $.RepoLink) "/pulls/" .PullRequest.Issue.Index) (Escape $.RepoRelPath) .PullRequest.Index | Safe}}
196196
<h1>
197197
<span id="issue-title">{{RenderIssueTitle $.Context .PullRequest.Issue.Title $.RepoLink $.Repository.ComposeMetas}}</span>
198198
<span class="index">#{{.PullRequest.Issue.Index}}</span>

0 commit comments

Comments
 (0)