-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ffb2765
commit 95d60f7
Showing
9 changed files
with
170 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .HasMerged) (not .Issue.IsClosed) (not .IsPullWorkInProgress)}} | ||
<div class="toggle-wip tw-mt-2" data-title="{{.Issue.Title}}" data-wip-prefix="{{index .PullRequestWorkInProgressPrefixes 0}}" data-update-url="{{.Issue.Link}}/title"> | ||
<a class="muted"> | ||
{{ctx.Locale.Tr "repo.pulls.still_in_progress"}} {{ctx.Locale.Tr "repo.pulls.add_prefix" (index .PullRequestWorkInProgressPrefixes 0)}} | ||
</a> | ||
</div> | ||
<a class="toggle-wip tw-block tw-mt-2" data-title="{{.Issue.Title}}" data-wip-prefix="{{index .PullRequestWorkInProgressPrefixes 0}}" data-update-url="{{.Issue.Link}}/title"> | ||
{{ctx.Locale.Tr "repo.pulls.still_in_progress"}} {{ctx.Locale.Tr "repo.pulls.add_prefix" (index .PullRequestWorkInProgressPrefixes 0)}} | ||
</a> | ||
{{end}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 50 additions & 48 deletions
98
templates/repo/issue/view_content/pull_merge_instruction.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,57 @@ | ||
<div class="divider"></div> | ||
<div class="instruct-toggle"> {{ctx.Locale.Tr "repo.pulls.cmd_instruction_hint"}} </div> | ||
<div class="instruct-content tw-mt-2 tw-hidden"> | ||
<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}} | ||
<div class="ui secondary segment"> | ||
{{if eq .PullRequest.Flow 0}} | ||
<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> | ||
{{else}} | ||
<div>git fetch -u origin {{.PullRequest.GetGitRefName}}:{{$localBranch}}</div> | ||
<details> | ||
<summary>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_hint"}}</summary> | ||
<div class="tw-mt-2"> | ||
<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}} | ||
<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"}} | ||
{{if not .AutodetectManualMerge}} | ||
<div>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_warning"}}</div> | ||
{{end}} | ||
</div> | ||
<div class="ui secondary segment"> | ||
<div data-pull-merge-style="merge"> | ||
<div>git checkout {{.PullRequest.BaseBranch}}</div> | ||
<div>git merge --no-ff {{$localBranch}}</div> | ||
</div> | ||
<div class="tw-hidden" data-pull-merge-style="rebase"> | ||
<div>git checkout {{.PullRequest.BaseBranch}}</div> | ||
<div>git merge --ff-only {{$localBranch}}</div> | ||
</div> | ||
<div class="tw-hidden" data-pull-merge-style="rebase-merge"> | ||
<div class="ui secondary segment"> | ||
{{if eq .PullRequest.Flow 0}} | ||
<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> | ||
{{else}} | ||
<div>git fetch -u origin {{.PullRequest.GetGitRefName}}:{{$localBranch}}</div> | ||
{{end}} | ||
<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> | ||
<div class="tw-hidden" data-pull-merge-style="squash"> | ||
<div>git checkout {{.PullRequest.BaseBranch}}</div> | ||
<div>git merge --squash {{$localBranch}}</div> | ||
</div> | ||
<div class="tw-hidden" data-pull-merge-style="fast-forward-only"> | ||
<div>git checkout {{.PullRequest.BaseBranch}}</div> | ||
<div>git merge --ff-only {{$localBranch}}</div> | ||
{{if .ShowMergeInstructions}} | ||
<div> | ||
<h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_title"}}</h3> | ||
{{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_desc"}} | ||
{{if not .AutodetectManualMerge}} | ||
<div>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_warning"}}</div> | ||
{{end}} | ||
</div> | ||
<div class="tw-hidden" data-pull-merge-style="manually-merged"> | ||
<div>git checkout {{.PullRequest.BaseBranch}}</div> | ||
<div>git merge {{$localBranch}}</div> | ||
<div class="ui secondary segment"> | ||
<div data-pull-merge-style="merge"> | ||
<div>git checkout {{.PullRequest.BaseBranch}}</div> | ||
<div>git merge --no-ff {{$localBranch}}</div> | ||
</div> | ||
<div class="tw-hidden" data-pull-merge-style="rebase"> | ||
<div>git checkout {{.PullRequest.BaseBranch}}</div> | ||
<div>git merge --ff-only {{$localBranch}}</div> | ||
</div> | ||
<div class="tw-hidden" data-pull-merge-style="rebase-merge"> | ||
<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> | ||
<div class="tw-hidden" data-pull-merge-style="squash"> | ||
<div>git checkout {{.PullRequest.BaseBranch}}</div> | ||
<div>git merge --squash {{$localBranch}}</div> | ||
</div> | ||
<div class="tw-hidden" data-pull-merge-style="fast-forward-only"> | ||
<div>git checkout {{.PullRequest.BaseBranch}}</div> | ||
<div>git merge --ff-only {{$localBranch}}</div> | ||
</div> | ||
<div class="tw-hidden" data-pull-merge-style="manually-merged"> | ||
<div>git checkout {{.PullRequest.BaseBranch}}</div> | ||
<div>git merge {{$localBranch}}</div> | ||
</div> | ||
<div>git push origin {{.PullRequest.BaseBranch}}</div> | ||
</div> | ||
<div>git push origin {{.PullRequest.BaseBranch}}</div> | ||
{{end}} | ||
</div> | ||
{{end}} | ||
</div> | ||
</details> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.