forked from go-gitea/gitea
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: Add link to members and repositories at teams page (go-gitea#27744) Add dedicated class for empty placeholders (go-gitea#27788) Close all hashed buffers (go-gitea#27787) Fix typo when updating email address (go-gitea#27789) Improve pull request command line instructions (go-gitea#27778)
- Loading branch information
Showing
12 changed files
with
76 additions
and
27 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
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
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
46 changes: 36 additions & 10 deletions
46
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,19 +1,45 @@ | ||
<div class="divider"></div> | ||
<div class="instruct-toggle"> {{ctx.Locale.Tr "repo.pulls.merge_instruction_hint" | Safe}} </div> | ||
<div class="instruct-toggle"> {{ctx.Locale.Tr "repo.pulls.cmd_instruction_hint" | Safe}} </div> | ||
<div class="instruct-content gt-mt-3 gt-hidden"> | ||
<div><h3 class="gt-dib">{{ctx.Locale.Tr "step1"}}</h3> {{ctx.Locale.Tr "repo.pulls.merge_instruction_step1_desc"}}</div> | ||
<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 .Flow 0}} | ||
<div>git checkout -b {{if ne .HeadRepo.ID .BaseRepo.ID}}{{.HeadRepo.OwnerName}}-{{end}}{{.HeadBranch}} {{.BaseBranch}}</div> | ||
<div>git pull {{if ne .HeadRepo.ID .BaseRepo.ID}}<gitea-origin-url data-url="{{.HeadRepo.Link}}"></gitea-origin-url>{{else}}origin{{end}} {{.HeadBranch}}</div> | ||
{{if eq .PullRequest.Flow 0}} | ||
<div>git fetch -u {{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}}<gitea-origin-url data-url="{{.PullRequest.HeadRepo.Link}}"></gitea-origin-url>{{else}}origin{{end}} {{.PullRequest.HeadBranch}}:{{$localBranch}}</div> | ||
<div>git checkout {{$localBranch}}</div> | ||
{{else}} | ||
<div>git fetch origin {{.GetGitRefName}}:{{.HeadBranch}}</div> | ||
<div>git fetch -u origin {{.GetGitRefName}}:{{$localBranch}}</div> | ||
{{end}} | ||
</div> | ||
<div><h3 class="gt-dib">{{ctx.Locale.Tr "step2"}}</h3> {{ctx.Locale.Tr "repo.pulls.merge_instruction_step2_desc"}}</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 class="ui secondary segment"> | ||
<div>git checkout {{.BaseBranch}}</div> | ||
<div>git merge --no-ff {{if ne .HeadRepo.ID .BaseRepo.ID}}{{.HeadRepo.OwnerName}}-{{end}}{{.HeadBranch}}</div> | ||
<div>git push origin {{.BaseBranch}}</div> | ||
<div data-pull-merge-style="merge"> | ||
<div>git checkout {{.PullRequest.BaseBranch}}</div> | ||
<div>git merge --no-ff {{$localBranch}}</div> | ||
</div> | ||
<div class="gt-hidden" data-pull-merge-style="rebase"> | ||
<div>git checkout {{.PullRequest.BaseBranch}}</div> | ||
<div>git merge --ff-only {{$localBranch}}</div> | ||
</div> | ||
<div class="gt-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="gt-hidden" data-pull-merge-style="squash"> | ||
<div>git checkout {{.PullRequest.BaseBranch}}</div> | ||
<div>git merge --squash {{$localBranch}}</div> | ||
</div> | ||
<div class="gt-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> | ||
{{end}} | ||
</div> |
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