From e68b9d00a6e05b3a941f63ffb696f91e554ac5ec Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 18 Oct 2024 20:33:49 +0200 Subject: Adding upstream version 9.0.3. Signed-off-by: Daniel Baumann --- .../issue/view_content/pull_merge_instruction.tmpl | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 templates/repo/issue/view_content/pull_merge_instruction.tmpl (limited to 'templates/repo/issue/view_content/pull_merge_instruction.tmpl') diff --git a/templates/repo/issue/view_content/pull_merge_instruction.tmpl b/templates/repo/issue/view_content/pull_merge_instruction.tmpl new file mode 100644 index 0000000..b7aae53 --- /dev/null +++ b/templates/repo/issue/view_content/pull_merge_instruction.tmpl @@ -0,0 +1,57 @@ +
+
+ {{ctx.Locale.Tr "repo.pulls.cmd_instruction_hint"}} +

{{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_title"}}

{{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_desc"}}
+ {{$localBranch := .PullRequest.HeadBranch}} + {{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}} + {{$localBranch = print .PullRequest.HeadRepo.OwnerName "-" .PullRequest.HeadBranch}} + {{end}} +
+ {{if eq .PullRequest.Flow 0}} +
git fetch -u {{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}}{{else}}origin{{end}} {{.PullRequest.HeadBranch}}:{{$localBranch}}
+ {{else}} +
git fetch -u origin +refs/pull/{{.PullRequest.Index}}/head:{{$localBranch}}
+ {{end}} +
git checkout {{$localBranch}}
+
+ {{if .ShowMergeInstructions}} +
+

{{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_title"}}

+ {{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_desc"}} + {{if not .AutodetectManualMerge}} +

{{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_warning"}}

+ {{end}} +
+
+
+
git checkout {{.PullRequest.BaseBranch}}
+
git merge --no-ff {{$localBranch}}
+
+
+
git checkout {{$localBranch}}
+
git rebase {{.PullRequest.BaseBranch}}
+
git checkout {{.PullRequest.BaseBranch}}
+
git merge --ff-only {{$localBranch}}
+
+
+
git checkout {{$localBranch}}
+
git rebase {{.PullRequest.BaseBranch}}
+
git checkout {{.PullRequest.BaseBranch}}
+
git merge --no-ff {{$localBranch}}
+
+
+
git checkout {{.PullRequest.BaseBranch}}
+
git merge --squash {{$localBranch}}
+
+
+
git checkout {{.PullRequest.BaseBranch}}
+
git merge --ff-only {{$localBranch}}
+
+
+
git checkout {{.PullRequest.BaseBranch}}
+
git merge {{$localBranch}}
+
+
git push origin {{.PullRequest.BaseBranch}}
+
+ {{end}} +
-- cgit v1.2.3