Use monospace font in PR command line instructions (#35074)

Before:

<img width="878" height="426" alt="Screenshot 2025-07-14 at 17 17 11"
src="https://github.com/user-attachments/assets/6e27acb9-bad5-4811-b7b1-5418f0ef12eb"
/>

After:

<img width="878" height="429" alt="Screenshot 2025-07-14 at 17 17 22"
src="https://github.com/user-attachments/assets/b0bd2bfa-e4e2-492a-9c08-66607343a459"
/>

Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
silverwind
2025-07-15 09:48:14 +02:00
committed by GitHub
parent 990ae2bfa8
commit 558005a5ea

View File

@ -7,7 +7,7 @@
{{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}} {{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}}
{{$localBranch = print .PullRequest.HeadRepo.OwnerName "-" .PullRequest.HeadBranch}} {{$localBranch = print .PullRequest.HeadRepo.OwnerName "-" .PullRequest.HeadBranch}}
{{end}} {{end}}
<div class="ui secondary segment"> <div class="ui secondary segment tw-font-mono">
{{if eq .PullRequest.Flow 0}} {{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> <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}} {{else}}
@ -23,7 +23,7 @@
<div>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_warning"}}</div> <div>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_warning"}}</div>
{{end}} {{end}}
</div> </div>
<div class="ui secondary segment"> <div class="ui secondary segment tw-font-mono">
<div data-pull-merge-style="merge"> <div data-pull-merge-style="merge">
<div>git checkout {{.PullRequest.BaseBranch}}</div> <div>git checkout {{.PullRequest.BaseBranch}}</div>
<div>git merge --no-ff {{$localBranch}}</div> <div>git merge --no-ff {{$localBranch}}</div>