Skip to content

Commit d823577

Browse files
committed
Merge remote-tracking branch 'upstream/main'
* upstream/main: Include go.mod in gomod-check and rename to tidy-check (go-gitea#21025) [skip ci] Updated translations via Crowdin Update a few go dependencies (go-gitea#21022) [skip ci] Updated translations via Crowdin Fix missed sort bug (go-gitea#20996) Fix typo (go-gitea#21004) Make sure fmt catches all templates (go-gitea#20979) Remove black labels and CSS cleanup (go-gitea#21003)
2 parents 9425b13 + b7a4b45 commit d823577

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+651
-706
lines changed

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ clean:
243243
.PHONY: fmt
244244
fmt:
245245
@MISSPELL_PACKAGE=$(MISSPELL_PACKAGE) GOFUMPT_PACKAGE=$(GOFUMPT_PACKAGE) $(GO) run build/code-batch-process.go gitea-fmt -w '{file-list}'
246-
$(eval TEMPLATES := $(wildcard templates/**/*.tmpl))
246+
$(eval TEMPLATES := $(shell find templates -type f -name '*.tmpl'))
247247
@# strip whitespace after '{{' and before `}}` unless there is only whitespace before it
248248
@$(SED_INPLACE) -e 's/{{[ ]\{1,\}/{{/g' -e '/^[ ]\{1,\}}}/! s/[ ]\{1,\}}}/}}/g' $(TEMPLATES)
249249

@@ -311,7 +311,7 @@ checks: checks-frontend checks-backend
311311
checks-frontend: lockfile-check svg-check
312312

313313
.PHONY: checks-backend
314-
checks-backend: gomod-check swagger-check swagger-validate
314+
checks-backend: tidy-check swagger-check swagger-validate
315315

316316
.PHONY: lint
317317
lint: lint-frontend lint-backend
@@ -388,9 +388,9 @@ tidy:
388388
vendor: tidy
389389
$(GO) mod vendor
390390

391-
.PHONY: gomod-check
392-
gomod-check: tidy
393-
@diff=$$(git diff go.sum); \
391+
.PHONY: tidy-check
392+
tidy-check: tidy
393+
@diff=$$(git diff go.mod go.sum); \
394394
if [ -n "$$diff" ]; then \
395395
echo "Please run 'make tidy' and commit the result:"; \
396396
echo "$${diff}"; \

docs/content/doc/installation/on-kubernetes.zh-cn.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ helm install gitea gitea/gitea
3030
您也可以通过 `helm show` 命令导出 `README.md` 和配置文件 `values.yaml` 进行学习和编辑,例如:
3131

3232
```bash
33-
helm show values gitea > values.yaml
34-
helm show readme gitea > README.md
33+
helm show values gitea/gitea > values.yaml
34+
helm show readme gitea/gitea > README.md
3535

3636
# 使用自定义的配置文件 values.yaml
3737
helm install gitea -f values.yaml gitea/gitea

go.mod

Lines changed: 92 additions & 91 deletions
Large diffs are not rendered by default.

go.sum

Lines changed: 291 additions & 351 deletions
Large diffs are not rendered by default.

models/issues/issue_project.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ func LoadIssuesFromBoard(b *project_model.Board) (IssueList, error) {
6868
issues, err := Issues(&IssuesOptions{
6969
ProjectBoardID: b.ID,
7070
ProjectID: b.ProjectID,
71+
SortType: "project-column-sorting",
7172
})
7273
if err != nil {
7374
return nil, err
@@ -79,6 +80,7 @@ func LoadIssuesFromBoard(b *project_model.Board) (IssueList, error) {
7980
issues, err := Issues(&IssuesOptions{
8081
ProjectBoardID: -1, // Issues without ProjectBoardID
8182
ProjectID: b.ProjectID,
83+
SortType: "project-column-sorting",
8284
})
8385
if err != nil {
8486
return nil, err

options/locale/locale_ja-JP.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,8 @@ org_no_results=一致する組織が見つかりません。
277277
code_no_results=検索ワードに一致するソースコードが見つかりません。
278278
code_search_results='%s' の検索結果
279279
code_last_indexed_at=最終取得 %s
280+
relevant_repositories_tooltip=フォークリポジトリや、トピック、アイコン、説明のいずれも無いリポジトリは表示されません。
281+
relevant_repositories=妥当と思われるリポジトリのみを表示しています。 <a href="%s">フィルタリングしない結果を表示</a>。
280282

281283

282284
[auth]
@@ -3129,6 +3131,8 @@ rubygems.dependencies.development=開発用依存関係
31293131
rubygems.required.ruby=必要なRubyバージョン
31303132
rubygems.required.rubygems=必要なRubyGemバージョン
31313133
rubygems.documentation=RubyGemsレジストリの詳細については、<a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">ドキュメント</a> を参照してください。
3134+
vagrant.install=Vagrant ボックスを追加するには、次のコマンドを実行します。
3135+
vagrant.documentation=Vagrantレジストリの詳細については <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/vagrant/">ドキュメント</a>を参照してください。
31323136
settings.link=このパッケージをリポジトリにリンク
31333137
settings.link.description=パッケージをリポジトリにリンクすると、リポジトリのパッケージリストに表示されるようになります。
31343138
settings.link.select=リポジトリを選択

options/locale/locale_zh-CN.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3129,6 +3129,8 @@ rubygems.dependencies.development=开发依赖
31293129
rubygems.required.ruby=需要 Ruby 版本
31303130
rubygems.required.rubygems=需要 RubyGem 版本
31313131
rubygems.documentation=关于 RubyGems 注册中心的更多信息,请参阅 <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">文档</a>。
3132+
vagrant.install=若要添加一个 Vagrant box,请运行以下命令:
3133+
vagrant.documentation=关于 Vagrant 注册中心的更多信息,请参阅 <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/vagrant/">文档</a>。
31323134
settings.link=将此软件包链接到仓库
31333135
settings.link.description=如果您将一个软件包与一个代码库链接起来,软件包将显示在代码库的软件包列表中。
31343136
settings.link.select=选择仓库

services/webhook/dingtalk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
api "code.gitea.io/gitea/modules/structs"
1616
"code.gitea.io/gitea/modules/util"
1717

18-
dingtalk "github.com/lunny/dingtalk_webhook"
18+
dingtalk "gitea.com/lunny/dingtalk_webhook"
1919
)
2020

2121
type (

templates/admin/auth/edit.tmpl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
<!-- LDAP and DLDAP -->
2525
{{if or .Source.IsLDAP .Source.IsDLDAP}}
26-
{{ $cfg:=.Source.Cfg }}
26+
{{$cfg:=.Source.Cfg}}
2727
<div class="inline required field {{if .Err_SecurityProtocol}}error{{end}}">
2828
<label>{{.locale.Tr "admin.auths.security_protocol"}}</label>
2929
<div class="ui selection security-protocol dropdown">
@@ -180,7 +180,7 @@
180180

181181
<!-- SMTP -->
182182
{{if .Source.IsSMTP}}
183-
{{ $cfg:=.Source.Cfg }}
183+
{{$cfg:=.Source.Cfg}}
184184
<div class="inline required field">
185185
<label>{{.locale.Tr "admin.auths.smtp_auth"}}</label>
186186
<div class="ui selection type dropdown">
@@ -242,7 +242,7 @@
242242

243243
<!-- PAM -->
244244
{{if .Source.IsPAM}}
245-
{{ $cfg:=.Source.Cfg }}
245+
{{$cfg:=.Source.Cfg}}
246246
<div class="required field">
247247
<label for="pam_service_name">{{.locale.Tr "admin.auths.pam_service_name"}}</label>
248248
<input id="pam_service_name" name="pam_service_name" value="{{$cfg.ServiceName}}" required>
@@ -262,7 +262,7 @@
262262

263263
<!-- OAuth2 -->
264264
{{if .Source.IsOAuth2}}
265-
{{ $cfg:=.Source.Cfg }}
265+
{{$cfg:=.Source.Cfg}}
266266
<div class="inline required field">
267267
<label>{{.locale.Tr "admin.auths.oauth2_provider"}}</label>
268268
<div class="ui selection type dropdown">
@@ -337,7 +337,7 @@
337337

338338
<div class="field">
339339
<label for="oauth2_scopes">{{.locale.Tr "admin.auths.oauth2_scopes"}}</label>
340-
<input id="oauth2_scopes" name="oauth2_scopes" value="{{if $cfg.Scopes}}{{Join $cfg.Scopes "," }}{{end}}">
340+
<input id="oauth2_scopes" name="oauth2_scopes" value="{{if $cfg.Scopes}}{{Join $cfg.Scopes ","}}{{end}}">
341341
</div>
342342
<div class="field">
343343
<label for="oauth2_required_claim_name">{{.locale.Tr "admin.auths.oauth2_required_claim_name"}}</label>
@@ -365,7 +365,7 @@
365365

366366
<!-- SSPI -->
367367
{{if .Source.IsSSPI}}
368-
{{ $cfg:=.Source.Cfg }}
368+
{{$cfg:=.Source.Cfg}}
369369
<div class="field">
370370
<div class="ui checkbox">
371371
<label for="sspi_auto_create_users"><strong>{{.locale.Tr "admin.auths.sspi_auto_create_users"}}</strong></label>

templates/admin/auth/new.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030
</div>
3131

3232
<!-- LDAP and DLDAP -->
33-
{{ template "admin/auth/source/ldap" . }}
33+
{{template "admin/auth/source/ldap" .}}
3434

3535
<!-- SMTP -->
36-
{{ template "admin/auth/source/smtp" . }}
36+
{{template "admin/auth/source/smtp" .}}
3737

3838
<!-- PAM -->
3939
<div class="pam required field {{if not (eq .type 4)}}hide{{end}}">
@@ -51,10 +51,10 @@
5151
</div>
5252

5353
<!-- OAuth2 -->
54-
{{ template "admin/auth/source/oauth" . }}
54+
{{template "admin/auth/source/oauth" .}}
5555

5656
<!-- SSPI -->
57-
{{ template "admin/auth/source/sspi" . }}
57+
{{template "admin/auth/source/sspi" .}}
5858

5959
<div class="ldap field">
6060
<div class="ui checkbox">

templates/admin/user/edit.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
{{.CsrfTokenHtml}}
1313
<div class="field {{if .Err_UserName}}error{{end}}">
1414
<label for="user_name">{{.locale.Tr "username"}}</label>
15-
<input id="user_name" name="user_name" value="{{.User.Name}}" autofocus {{if not .User.IsLocal }}disabled{{end}}>
15+
<input id="user_name" name="user_name" value="{{.User.Name}}" autofocus {{if not .User.IsLocal}}disabled{{end}}>
1616
</div>
1717
<!-- Types and name -->
1818
<div class="inline required field {{if .Err_LoginType}}error{{end}}">

templates/admin/user/new.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969

7070
<div class="inline field local{{if ne .login_type "0-0"}} hide{{end}}">
7171
<div class="ui checkbox">
72-
<label><strong>{{.locale.Tr "auth.allow_password_change" }}</strong></label>
72+
<label><strong>{{.locale.Tr "auth.allow_password_change"}}</strong></label>
7373
<input name="must_change_password" type="checkbox" checked>
7474
</div>
7575
</div>

templates/mail/auth/activate.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<title>{{.locale.Tr "mail.activate_account.title" (.DisplayName|DotEscape)}}</title>
77
</head>
88

9-
{{ $activate_url := printf "%suser/activate?code=%s" AppUrl (QueryEscape .Code)}}
9+
{{$activate_url := printf "%suser/activate?code=%s" AppUrl (QueryEscape .Code)}}
1010
<body>
1111
<p>{{.locale.Tr "mail.activate_account.text_1" (.DisplayName|DotEscape) AppName | Str2html}}</p><br>
1212
<p>{{.locale.Tr "mail.activate_account.text_2" .ActiveCodeLives | Str2html}}</p><p><a href="{{$activate_url}}">{{$activate_url}}</a></p><br>

templates/mail/auth/activate_email.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<title>{{.locale.Tr "mail.activate_email.title" (.DisplayName|DotEscape)}}</title>
77
</head>
88

9-
{{ $activate_url := printf "%suser/activate_email?code=%s&email=%s" AppUrl (QueryEscape .Code) (QueryEscape .Email)}}
9+
{{$activate_url := printf "%suser/activate_email?code=%s&email=%s" AppUrl (QueryEscape .Code) (QueryEscape .Email)}}
1010
<body>
1111
<p>{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape) | Str2html}}</p><br>
1212
<p>{{.locale.Tr "mail.activate_email.text" .ActiveCodeLives | Str2html}}</p><p><a href="{{$activate_url}}">{{$activate_url}}</a></p><br>

templates/mail/auth/reset_passwd.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<title>{{.locale.Tr "mail.reset_password.title" (.DisplayName|DotEscape)}}</title>
77
</head>
88

9-
{{ $recover_url := printf "%suser/recover_account?code=%s" AppUrl (QueryEscape .Code)}}
9+
{{$recover_url := printf "%suser/recover_account?code=%s" AppUrl (QueryEscape .Code)}}
1010
<body>
1111
<p>{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape) | Str2html}}</p><br>
1212
<p>{{.locale.Tr "mail.reset_password.text" .ResetPwdCodeLives | Str2html}}</p><p><a href="{{$recover_url}}">{{$recover_url}}</a></p><br>

templates/org/member/members.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{{template "base/alert" .}}
66

77
<div class="list">
8-
{{ range .Members}}
8+
{{range .Members}}
99
<div class="item ui grid">
1010
<div class="ui four wide column" style="display: flex;">
1111
{{avatar . 48}}
@@ -19,7 +19,7 @@
1919
{{$.locale.Tr "org.members.membership_visibility"}}
2020
</div>
2121
<div class="meta">
22-
{{ $isPublic := index $.MembersIsPublicMember .ID}}
22+
{{$isPublic := index $.MembersIsPublicMember .ID}}
2323
{{if $isPublic}}
2424
<strong>{{$.locale.Tr "org.members.public"}}</strong>
2525
{{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}(<a class="link-action" href data-url="{{$.OrgLink}}/members/action/private?uid={{.ID}}">{{$.locale.Tr "org.members.public_helper"}}</a>){{end}}

templates/org/menu.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<a class="{{if $.PageIsOrgTeams}}active{{end}} item" href="{{$.OrgLink}}/teams">
1919
{{svg "octicon-people"}}&nbsp;{{$.locale.Tr "org.teams"}}
2020
{{if .NumTeams}}
21-
<div class="ui black label">{{.NumTeams}}</div>
21+
<div class="ui primary label">{{.NumTeams}}</div>
2222
{{end}}
2323
</a>
2424
{{end}}

templates/package/shared/list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
{{svg "octicon-package" 32}}
5151
<h2>{{.locale.Tr "packages.empty"}}</h2>
5252
{{if and .Repository .CanWritePackages}}
53-
{{$packagesUrl := URLJoin .Owner.HTMLURL "-" "packages" }}
53+
{{$packagesUrl := URLJoin .Owner.HTMLURL "-" "packages"}}
5454
<p>{{.locale.Tr "packages.empty.repo" $packagesUrl | Safe}}</p>
5555
{{end}}
5656
<p>{{.locale.Tr "packages.empty.documentation" | Safe}}</p>

templates/repo/diff/blob_excerpt.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
<tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}">
44
{{if eq .GetType 4}}
55
<td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}">
6-
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5) }}
6+
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}}
77
<a role="button" class="blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=down&wiki={{$.PageIsWiki}}" data-anchor="{{$.Anchor}}">
88
{{svg "octicon-fold-down"}}
99
</a>
1010
{{end}}
11-
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4) }}
11+
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4)}}
1212
<a role="button" class="blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=split&direction=up&wiki={{$.PageIsWiki}}" data-anchor="{{$.Anchor}}">
1313
{{svg "octicon-fold-up"}}
1414
</a>
@@ -47,12 +47,12 @@
4747
<tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}">
4848
{{if eq .GetType 4}}
4949
<td colspan="2" class="lines-num">
50-
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5) }}
50+
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}}
5151
<a role="button" class="blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=down&wiki={{$.PageIsWiki}}" data-anchor="{{$.Anchor}}">
5252
{{svg "octicon-fold-down"}}
5353
</a>
5454
{{end}}
55-
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4) }}
55+
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4)}}
5656
<a role="button" class="blob-excerpt" data-url="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=up&wiki={{$.PageIsWiki}}" data-anchor="{{$.Anchor}}">
5757
{{svg "octicon-fold-up"}}
5858
</a>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{{if $.comment}}
2-
{{ template "repo/diff/comment_form" dict "root" $.root "hidden" $.hidden "reply" $.reply "Line" $.comment.UnsignedLine "File" $.comment.TreePath "Side" $.comment.DiffSide "HasComments" true}}
2+
{{template "repo/diff/comment_form" dict "root" $.root "hidden" $.hidden "reply" $.reply "Line" $.comment.UnsignedLine "File" $.comment.TreePath "Side" $.comment.DiffSide "HasComments" true}}
33
{{else if $.root}}
4-
{{ template "repo/diff/comment_form" $}}
4+
{{template "repo/diff/comment_form" $}}
55
{{else}}
6-
{{ template "repo/diff/comment_form" dict "root" $}}
6+
{{template "repo/diff/comment_form" dict "root" $}}
77
{{end}}

templates/repo/diff/comments.tmpl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{{range .comments}}
22

3-
{{ $createdStr:= TimeSinceUnix .CreatedUnix $.root.locale }}
3+
{{$createdStr:= TimeSinceUnix .CreatedUnix $.root.locale}}
44
<div class="comment" id="{{.HashTag}}">
5-
{{if .OriginalAuthor }}
5+
{{if .OriginalAuthor}}
66
<span class="avatar"><img src="{{AppSubUrl}}/assets/img/avatar_default.png"></span>
77
{{else}}
88
<a class="avatar" {{if gt .Poster.ID 0}}href="{{.Poster.HomeLink}}"{{end}}>
@@ -12,17 +12,17 @@
1212
<div class="content comment-container">
1313
<div class="ui top attached header comment-header df ac sb">
1414
<div class="comment-header-left df ac">
15-
{{if .OriginalAuthor }}
15+
{{if .OriginalAuthor}}
1616
<span class="text black mr-2">
1717
{{svg (MigrationIcon $.root.Repository.GetOriginalURLHostname)}}
18-
{{ .OriginalAuthor }}
18+
{{.OriginalAuthor}}
1919
</span>
2020
<span class="text grey">
2121
{{$.root.locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr | Safe}}
2222
</span>
2323
<span class="text migrate">
2424
{{if $.root.Repository.OriginalURL}}
25-
({{$.root.locale.Tr "repo.migrated_from" ($.root.Repository.OriginalURL | Escape) ($.root.Repository.GetOriginalURLHostname | Escape) | Safe }})
25+
({{$.root.locale.Tr "repo.migrated_from" ($.root.Repository.OriginalURL | Escape) ($.root.Repository.GetOriginalURLHostname | Escape) | Safe}})
2626
{{end}}
2727
</span>
2828
{{else}}
@@ -46,7 +46,7 @@
4646
</div>
4747
{{end}}
4848
{{end}}
49-
{{template "repo/issue/view_content/add_reaction" Dict "ctx" $.root "ActionURL" (Printf "%s/comments/%d/reactions" $.root.RepoLink .ID) }}
49+
{{template "repo/issue/view_content/add_reaction" Dict "ctx" $.root "ActionURL" (Printf "%s/comments/%d/reactions" $.root.RepoLink .ID)}}
5050
{{template "repo/issue/view_content/context_menu" Dict "ctx" $.root "item" . "delete" true "issue" false "diff" true "IsCommentPoster" (and $.root.IsSigned (eq $.root.SignedUserID .PosterID))}}
5151
</div>
5252
</div>

templates/repo/diff/compare.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
{{if and $.PageIsComparePull $.IsSigned (not .Repository.IsArchived)}}
88
{{.locale.Tr "repo.pulls.compare_changes"}}
99
<div class="sub header">{{.locale.Tr "repo.pulls.compare_changes_desc"}}</div>
10-
{{ else }}
10+
{{else}}
1111
{{.locale.Tr "action.compare_commits_general"}}
12-
{{ end }}
12+
{{end}}
1313
</h2>
14-
{{ $BaseCompareName := $.BaseName -}}
14+
{{$BaseCompareName := $.BaseName -}}
1515
{{- $HeadCompareName := $.HeadRepo.OwnerName -}}
1616
{{- if and (eq $.BaseName $.HeadRepo.OwnerName) (ne $.Repository.Name $.HeadRepo.Name) -}}
1717
{{- $HeadCompareName = printf "%s/%s" $.HeadRepo.OwnerName $.HeadRepo.Name -}}
@@ -174,7 +174,7 @@
174174
</div>
175175

176176
{{if .IsNothingToCompare}}
177-
{{if and $.IsSigned $.AllowEmptyPr (not .Repository.IsArchived) }}
177+
{{if and $.IsSigned $.AllowEmptyPr (not .Repository.IsArchived)}}
178178
<div class="ui segment">{{.locale.Tr "repo.pulls.nothing_to_compare_and_allow_empty_pr"}}</div>
179179
<div class="ui info message show-form-container" {{if .Flash}}style="display: none"{{end}}>
180180
<button class="ui button green show-form">{{.locale.Tr "repo.pulls.new"}}</button>

0 commit comments

Comments
 (0)