[PORT] Add warning message in merge instructions when AutodetectManualMerge
was not enabled (gitea#31805)
--- Conflict resolution: trivial Things done differently: Improve localization message, use the paragraph element instead of the div element, fix passing this variable to the template and add a integration test (cherry picked from commit 9633f336c87947dc7d2a5e76077a10699ba5e50d)
This commit is contained in:
parent
44002a6399
commit
e5f8d144f2
5 changed files with 53 additions and 2 deletions
|
@ -388,7 +388,7 @@
|
|||
{{end}}
|
||||
|
||||
{{if and .Issue.PullRequest.HeadRepo (not .Issue.PullRequest.HasMerged) (not .Issue.IsClosed)}}
|
||||
{{template "repo/issue/view_content/pull_merge_instruction" dict "PullRequest" .Issue.PullRequest "ShowMergeInstructions" .ShowMergeInstructions}}
|
||||
{{template "repo/issue/view_content/pull_merge_instruction" dict "PullRequest" .Issue.PullRequest "ShowMergeInstructions" .ShowMergeInstructions "AutodetectManualMerge" .AutodetectManualMerge}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -15,7 +15,13 @@
|
|||
<div>git checkout {{$localBranch}}</div>
|
||||
</div>
|
||||
{{if .ShowMergeInstructions}}
|
||||
<div><h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_title"}}</h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_desc"}}</div>
|
||||
<div id="merge-instructions">
|
||||
<h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_title"}}</h3>
|
||||
{{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_desc"}}
|
||||
{{if not .AutodetectManualMerge}}
|
||||
<p>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_warning"}}</p>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="ui secondary segment">
|
||||
<div data-pull-merge-style="merge">
|
||||
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue