mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Create pull request for base after editing file, if not enabled on fork (#24841)
Currently if pull requests are disabled on a fork but enabled on a base repo, creating/editing/deleting files does not offer the option to create a pull request. This change enables creating a pull request for the base repo in that case. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
committed by
GitHub
parent
1cf4d46bb1
commit
1bfa37ada2
@@ -41,17 +41,15 @@
|
||||
</div>
|
||||
{{if not .Repository.IsEmpty}}
|
||||
<div class="field">
|
||||
{{$pullRequestEnabled := .Repository.UnitEnabled $.Context $.UnitTypePullRequests}}
|
||||
{{$prUnit := .Repository.MustGetUnit $.Context $.UnitTypePullRequests}}
|
||||
<div class="ui radio checkbox">
|
||||
{{if $pullRequestEnabled}}
|
||||
{{if .CanCreatePullRequest}}
|
||||
<input type="radio" class="js-quick-pull-choice-option" name="commit_choice" value="commit-to-new-branch" button_text="{{.locale.Tr "repo.editor.propose_file_change"}}" {{if eq .commit_choice "commit-to-new-branch"}}checked{{end}}>
|
||||
{{else}}
|
||||
<input type="radio" class="js-quick-pull-choice-option" name="commit_choice" value="commit-to-new-branch" button_text="{{.locale.Tr "repo.editor.commit_changes"}}" {{if eq .commit_choice "commit-to-new-branch"}}checked{{end}}>
|
||||
{{end}}
|
||||
<label>
|
||||
{{svg "octicon-git-pull-request"}}
|
||||
{{if $pullRequestEnabled}}
|
||||
{{if .CanCreatePullRequest}}
|
||||
{{.locale.Tr "repo.editor.create_new_branch" | Safe}}
|
||||
{{else}}
|
||||
{{.locale.Tr "repo.editor.create_new_branch_np" | Safe}}
|
||||
|
Reference in New Issue
Block a user