2023-06-29 15:24:22 +03:00
|
|
|
<div class="divider"></div>
|
2024-07-08 20:32:59 +03:00
|
|
|
<details class="collapsible">
|
2024-08-09 19:14:19 +03:00
|
|
|
<summary class="tw-py-2"> {{ctx.Locale.Tr "repo.pulls.cmd_instruction_hint"}} </summary>
|
2023-10-25 18:01:31 +03:00
|
|
|
<div><h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_title"}}</h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_desc"}}</div>
|
|
|
|
{{$localBranch := .PullRequest.HeadBranch}}
|
|
|
|
{{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}}
|
|
|
|
{{$localBranch = print .PullRequest.HeadRepo.OwnerName "-" .PullRequest.HeadBranch}}
|
|
|
|
{{end}}
|
2022-06-11 17:44:20 +03:00
|
|
|
<div class="ui secondary segment">
|
2023-10-25 18:01:31 +03:00
|
|
|
{{if eq .PullRequest.Flow 0}}
|
2024-07-13 19:05:08 +03:00
|
|
|
<div>git fetch -u {{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}}<origin-url data-url="{{.PullRequest.HeadRepo.Link}}"></origin-url>{{else}}origin{{end}} {{.PullRequest.HeadBranch}}:{{$localBranch}}</div>
|
2022-06-11 17:44:20 +03:00
|
|
|
{{else}}
|
2024-07-13 19:05:08 +03:00
|
|
|
<div>git fetch -u origin +refs/pull/{{.PullRequest.Index}}/head:{{$localBranch}}</div>
|
2022-06-11 17:44:20 +03:00
|
|
|
{{end}}
|
2024-07-13 19:05:08 +03:00
|
|
|
<div>git checkout {{$localBranch}}</div>
|
2022-06-11 17:44:20 +03:00
|
|
|
</div>
|
2023-10-25 18:01:31 +03:00
|
|
|
{{if .ShowMergeInstructions}}
|
2024-08-10 04:09:34 +03:00
|
|
|
<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>
|
2022-06-11 17:44:20 +03:00
|
|
|
<div class="ui secondary segment">
|
2023-10-25 18:01:31 +03:00
|
|
|
<div data-pull-merge-style="merge">
|
|
|
|
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
|
|
|
<div>git merge --no-ff {{$localBranch}}</div>
|
|
|
|
</div>
|
2024-03-24 21:23:38 +03:00
|
|
|
<div class="tw-hidden" data-pull-merge-style="rebase">
|
2024-07-31 12:36:46 +03:00
|
|
|
<div>git checkout {{$localBranch}}</div>
|
|
|
|
<div>git rebase {{.PullRequest.BaseBranch}}</div>
|
2023-10-25 18:01:31 +03:00
|
|
|
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
|
|
|
<div>git merge --ff-only {{$localBranch}}</div>
|
|
|
|
</div>
|
2024-03-24 21:23:38 +03:00
|
|
|
<div class="tw-hidden" data-pull-merge-style="rebase-merge">
|
2023-10-25 18:01:31 +03:00
|
|
|
<div>git checkout {{$localBranch}}</div>
|
|
|
|
<div>git rebase {{.PullRequest.BaseBranch}}</div>
|
|
|
|
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
|
|
|
<div>git merge --no-ff {{$localBranch}}</div>
|
|
|
|
</div>
|
2024-03-24 21:23:38 +03:00
|
|
|
<div class="tw-hidden" data-pull-merge-style="squash">
|
2023-10-25 18:01:31 +03:00
|
|
|
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
|
|
|
<div>git merge --squash {{$localBranch}}</div>
|
|
|
|
</div>
|
2024-03-24 21:23:38 +03:00
|
|
|
<div class="tw-hidden" data-pull-merge-style="fast-forward-only">
|
2024-02-13 01:37:23 +03:00
|
|
|
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
|
|
|
<div>git merge --ff-only {{$localBranch}}</div>
|
|
|
|
</div>
|
2024-03-24 21:23:38 +03:00
|
|
|
<div class="tw-hidden" data-pull-merge-style="manually-merged">
|
2023-10-25 18:01:31 +03:00
|
|
|
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
|
|
|
<div>git merge {{$localBranch}}</div>
|
|
|
|
</div>
|
|
|
|
<div>git push origin {{.PullRequest.BaseBranch}}</div>
|
2022-06-11 17:44:20 +03:00
|
|
|
</div>
|
2023-10-25 18:01:31 +03:00
|
|
|
{{end}}
|
2024-07-08 20:32:59 +03:00
|
|
|
</details>
|