mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-25 12:15:54 +00:00
Ensure that new pull request button works on forked forks owned by owner of the root (#14932)
Prevent 404 on new pull request button on forked fork owned by the owner of the root repository. Also ensure that the names make sense. Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
f4629fc472
commit
bf53cf0e04
2 changed files with 32 additions and 11 deletions
|
@ -64,7 +64,7 @@
|
|||
{{if eq $n 0}}
|
||||
{{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}}
|
||||
<div class="fitted item mx-0">
|
||||
<a href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch | EscapePound}}...{{if ne .Repository.Owner.Name .BaseRepo.Owner.Name}}{{.Repository.Owner.Name}}:{{end}}{{.BranchName | EscapePound}}">
|
||||
<a href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch | EscapePound}}...{{if ne .Repository.Owner.Name .BaseRepo.Owner.Name}}{{.Repository.Owner.Name}}{{if .BaseRepo.IsFork}}/{{.Repository.Name}}{{end}}:{{end}}{{.BranchName | EscapePound}}">
|
||||
<button id="new-pull-request" class="ui compact basic button">{{if .PullRequestCtx.Allowed}}{{.i18n.Tr "repo.pulls.compare_changes"}}{{else}}{{.i18n.Tr "action.compare_branch"}}{{end}}</button>
|
||||
</a>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue