Skip to content

Commit 0261a67

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: Use random bytes to generate access token (go-gitea#21959) Replace fmt.Sprintf with hex.EncodeToString (go-gitea#21960) Implement FSFE REUSE for golang files (go-gitea#21840) Correct the fallbacks for mailer configuration (go-gitea#21945) [skip ci] Updated licenses and gitignores Fix typos (go-gitea#21947) Fix markdown anchor re-clicking (go-gitea#21931) Prevent NPE if trying to restore an already restored deleted branch (go-gitea#21940) add rel="me" to org.website link (go-gitea#21941)
2 parents c7939bb + f047ee0 commit 0261a67

File tree

1,879 files changed

+2064
-3886
lines changed

Some content is hidden

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

1,879 files changed

+2064
-3886
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions

build.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright 2020 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
3+
44

55
//go:build vendor
66

build/code-batch-process.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2021 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
//go:build ignore
65

build/codeformat/formatimports.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2021 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package codeformat
65

build/codeformat/formatimports_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2021 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package codeformat
65

build/generate-bindata.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2020 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
//go:build ignore
65

build/generate-emoji.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright 2020 The Gitea Authors. All rights reserved.
22
// Copyright 2015 Kenneth Shaw
3-
// Use of this source code is governed by a MIT-style
4-
// license that can be found in the LICENSE file.
3+
// SPDX-License-Identifier: MIT
54

65
//go:build ignore
76

@@ -209,8 +208,8 @@ func generate() ([]byte, error) {
209208

210209
const hdr = `
211210
// Copyright 2020 The Gitea Authors. All rights reserved.
212-
// Use of this source code is governed by a MIT-style
213-
// license that can be found in the LICENSE file.
211+
// SPDX-License-Identifier: MIT
212+
214213
215214
package emoji
216215

build/generate-go-licenses.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2022 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
//go:build ignore
65

build/gocovmerge.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright 2020 The Gitea Authors. All rights reserved.
22
// Copyright (c) 2015, Wade Simmons
3-
// Use of this source code is governed by a MIT-style
4-
// license that can be found in the LICENSE file.
3+
// SPDX-License-Identifier: MIT
54

65
// gocovmerge takes the results from multiple `go test -coverprofile` runs and
76
// merges them into one profile

cmd/admin.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright 2016 The Gogs Authors. All rights reserved.
22
// Copyright 2016 The Gitea Authors. All rights reserved.
3-
// Use of this source code is governed by a MIT-style
4-
// license that can be found in the LICENSE file.
3+
// SPDX-License-Identifier: MIT
54

65
package cmd
76

cmd/admin_auth_ldap.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2019 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package cmd
65

cmd/admin_auth_ldap_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2019 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package cmd
65

cmd/cert.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Copyright 2009 The Go Authors. All rights reserved.
22
// Copyright 2014 The Gogs Authors. All rights reserved.
33
// Copyright 2016 The Gitea Authors. All rights reserved.
4-
// Use of this source code is governed by a MIT-style
5-
// license that can be found in the LICENSE file.
4+
// SPDX-License-Identifier: MIT
65

76
package cmd
87

cmd/cmd.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2018 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
// Package cmd provides subcommands to the gitea binary - such as "web" or
65
// "admin".

cmd/convert.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2019 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package cmd
65

cmd/docs.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2020 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package cmd
65

cmd/doctor.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2019 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package cmd
65

cmd/dump.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright 2014 The Gogs Authors. All rights reserved.
22
// Copyright 2016 The Gitea Authors. All rights reserved.
3-
// Use of this source code is governed by a MIT-style
4-
// license that can be found in the LICENSE file.
3+
// SPDX-License-Identifier: MIT
54

65
package cmd
76

cmd/dump_repo.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2020 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package cmd
65

cmd/embedded.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2020 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
//go:build bindata
65

cmd/embedded_stub.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2020 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
//go:build !bindata
65

cmd/generate.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright 2016 The Gogs Authors. All rights reserved.
22
// Copyright 2016 The Gitea Authors. All rights reserved.
3-
// Use of this source code is governed by a MIT-style
4-
// license that can be found in the LICENSE file.
3+
// SPDX-License-Identifier: MIT
54

65
package cmd
76

cmd/hook.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2017 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package cmd
65

@@ -218,9 +217,9 @@ Gitea or set your environment appropriately.`, "")
218217
}
219218
}
220219

221-
supportProcRecive := false
220+
supportProcReceive := false
222221
if git.CheckGitVersionAtLeast("2.29") == nil {
223-
supportProcRecive = true
222+
supportProcReceive = true
224223
}
225224

226225
for scanner.Scan() {
@@ -241,9 +240,9 @@ Gitea or set your environment appropriately.`, "")
241240
lastline++
242241

243242
// If the ref is a branch or tag, check if it's protected
244-
// if supportProcRecive all ref should be checked because
243+
// if supportProcReceive all ref should be checked because
245244
// permission check was delayed
246-
if supportProcRecive || strings.HasPrefix(refFullName, git.BranchPrefix) || strings.HasPrefix(refFullName, git.TagPrefix) {
245+
if supportProcReceive || strings.HasPrefix(refFullName, git.BranchPrefix) || strings.HasPrefix(refFullName, git.TagPrefix) {
247246
oldCommitIDs[count] = oldCommitID
248247
newCommitIDs[count] = newCommitID
249248
refFullNames[count] = refFullName

cmd/hook_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2021 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package cmd
65

cmd/keys.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2018 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package cmd
65

cmd/mailer.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2020 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package cmd
65

cmd/main_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2022 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package cmd
65

cmd/manager.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2020 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package cmd
65

cmd/manager_logging.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2022 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package cmd
65

cmd/migrate.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2018 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package cmd
65

cmd/migrate_storage.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2020 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package cmd
65

cmd/migrate_storage_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2022 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package cmd
65

cmd/restore_repo.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2020 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package cmd
65

cmd/serv.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright 2014 The Gogs Authors. All rights reserved.
22
// Copyright 2016 The Gitea Authors. All rights reserved.
3-
// Use of this source code is governed by a MIT-style
4-
// license that can be found in the LICENSE file.
3+
// SPDX-License-Identifier: MIT
54

65
package cmd
76

cmd/web.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2014 The Gogs Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package cmd
65

cmd/web_acme.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2020 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package cmd
65

cmd/web_graceful.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2016 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package cmd
65

cmd/web_https.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2021 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package cmd
65

contrib/environment-to-ini/environment-to-ini.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2019 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package main
65

contrib/fixtures/fixture_generation.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2020 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package main
65

contrib/pr/checkout.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2020 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package main
65

custom/conf/app.example.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1590,7 +1590,7 @@ ROUTER = console
15901590
;; Prefix displayed before subject in mail
15911591
;SUBJECT_PREFIX =
15921592
;;
1593-
;; Mail server protocol. One of "smtp", "smtps", "smtp+startls", "smtp+unix", "sendmail", "dummy".
1593+
;; Mail server protocol. One of "smtp", "smtps", "smtp+starttls", "smtp+unix", "sendmail", "dummy".
15941594
;; - sendmail: use the operating system's `sendmail` command instead of SMTP. This is common on Linux systems.
15951595
;; - dummy: send email messages to the log as a testing phase.
15961596
;; If your provider does not explicitly say which protocol it uses but does provide a port,

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)