summaryrefslogtreecommitdiffstats
path: root/templates/repo/diff/compare.tmpl
diff options
context:
space:
mode:
authorsebastian-sauer <sauer.sebastian@gmail.com>2023-06-25 12:03:36 +0200
committerGitHub <noreply@github.com>2023-06-25 10:03:36 +0000
commit7609f2f27e717531aa9b6e8f6857516feddc3088 (patch)
tree96d90b2c8e4401ac08539cfff812adc7abe5bedd /templates/repo/diff/compare.tmpl
parent323c6cba20db618d48f4939d1fcaaa036ec0a0d7 (diff)
downloadgitea-7609f2f27e717531aa9b6e8f6857516feddc3088.tar.gz
gitea-7609f2f27e717531aa9b6e8f6857516feddc3088.zip
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)
Diffstat (limited to 'templates/repo/diff/compare.tmpl')
-rw-r--r--templates/repo/diff/compare.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/diff/compare.tmpl b/templates/repo/diff/compare.tmpl
index 4efe81682c..4387e89071 100644
--- a/templates/repo/diff/compare.tmpl
+++ b/templates/repo/diff/compare.tmpl
@@ -192,7 +192,7 @@
{{if .HasPullRequest}}
<div class="ui segment grid title">
<div class="twelve wide column issue-title">
- {{.locale.Tr "repo.pulls.has_pull_request" (Escape $.RepoLink) (Escape $.RepoRelPath) .PullRequest.Index | Safe}}
+ {{.locale.Tr "repo.pulls.has_pull_request" (print (Escape $.RepoLink) "/pulls/" .PullRequest.Issue.Index) (Escape $.RepoRelPath) .PullRequest.Index | Safe}}
<h1>
<span id="issue-title">{{RenderIssueTitle $.Context .PullRequest.Issue.Title $.RepoLink $.Repository.ComposeMetas}}</span>
<span class="index">#{{.PullRequest.Issue.Index}}</span>