Skip to content

Commit

Permalink
Link to existing PR when trying to open a new PR on the same branches (
Browse files Browse the repository at this point in the history
…#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)
  • Loading branch information
sebastian-sauer committed Jun 25, 2023
1 parent 323c6cb commit 7609f2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/repo/diff/compare.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 7609f2f

Please sign in to comment.