Skip to content

Commit 4a8045e

Browse files
committed
Merge remote-tracking branch 'origin/main' into zzc/dev/test_dev
2 parents 09f0dbc + fba7150 commit 4a8045e

File tree

474 files changed

+7257
-5954
lines changed

Some content is hidden

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

474 files changed

+7257
-5954
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Gitea DevContainer",
3-
"image": "mcr.microsoft.com/devcontainers/go:1.20-bullseye",
3+
"image": "mcr.microsoft.com/devcontainers/go:1.21-bullseye",
44
"features": {
55
// installs nodejs into container
66
"ghcr.io/devcontainers/features/node:1": {

.gitea/issue_template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
2. Please ask questions or configuration/deploy problems on our Discord
66
server (https://discord.gg/gitea) or forum (https://discourse.gitea.io).
77
3. Please take a moment to check that your issue doesn't already exist.
8-
4. Make sure it's not mentioned in the FAQ (https://docs.gitea.io/en-us/faq)
8+
4. Make sure it's not mentioned in the FAQ (https://docs.gitea.com/help/faq)
99
5. Please give all relevant information below for bug reports, because
1010
incomplete details will be handled as an invalid report.
1111
-->
@@ -26,7 +26,7 @@
2626
- [ ] No
2727
- Log gist:
2828
<!-- It really is important to provide pertinent logs -->
29-
<!-- Please read https://docs.gitea.io/en-us/logging-configuration/#debugging-problems -->
29+
<!-- Please read https://docs.gitea.com/administration/logging-config#collecting-logs-for-help -->
3030
<!-- In addition, if your problem relates to git commands set `RUN_MODE=dev` at the top of app.ini -->
3131

3232
## Description

.github/ISSUE_TEMPLATE/bug-report.yaml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Bug Report
22
description: Found something you weren't expecting? Report it here!
3-
labels: kind/bug
3+
labels: ["kind/bug"]
44
body:
55
- type: markdown
66
attributes:
@@ -14,12 +14,9 @@ body:
1414
server (https://discord.gg/gitea) or forum (https://discourse.gitea.io).
1515
3. Make sure you are using the latest release and
1616
take a moment to check that your issue hasn't been reported before.
17-
4. Make sure it's not mentioned in the FAQ (https://docs.gitea.io/en-us/faq)
18-
5. Please give all relevant information below for bug reports, because
17+
4. Make sure it's not mentioned in the FAQ (https://docs.gitea.com/help/faq)
18+
5. It's really important to provide pertinent details and logs (https://docs.gitea.com/help/support),
1919
incomplete details will be handled as an invalid report.
20-
6. In particular it's really important to provide pertinent logs. You must give us DEBUG level logs.
21-
Please read https://docs.gitea.io/en-us/logging-configuration/#debugging-problems
22-
In addition, if your problem relates to git commands set `RUN_MODE=dev` at the top of app.ini
2320
- type: textarea
2421
id: description
2522
attributes:
@@ -50,7 +47,7 @@ body:
5047
attributes:
5148
value: |
5249
It's really important to provide pertinent logs
53-
Please read https://docs.gitea.io/en-us/logging-configuration/#debugging-problems
50+
Please read https://docs.gitea.com/administration/logging-config#collecting-logs-for-help
5451
In addition, if your problem relates to git commands set `RUN_MODE=dev` at the top of app.ini
5552
- type: input
5653
id: logs
@@ -89,6 +86,6 @@ body:
8986
description: What database system are you running?
9087
options:
9188
- PostgreSQL
92-
- MySQL
89+
- MySQL/MariaDB
9390
- MSSQL
9491
- SQLite

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ contact_links:
88
about: Please ask questions and discuss configuration or deployment problems here.
99
- name: Discourse Forum
1010
url: https://discourse.gitea.io
11-
about: Questions and configuration or deployment problems can also be discussed on our forum.
11+
about: Questions and configuration or deployment problems can also be discussed on our forum.
1212
- name: Frequently Asked Questions
13-
url: https://docs.gitea.io/en-us/faq
13+
url: https://docs.gitea.com/help/faq
1414
about: Please check if your question isn't mentioned here.
1515
- name: Crowdin Translations
1616
url: https://crowdin.com/project/gitea

.github/ISSUE_TEMPLATE/ui.bug-report.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ body:
1313
2. Please ask questions or configuration/deploy problems on our Discord
1414
server (https://discord.gg/gitea) or forum (https://discourse.gitea.io).
1515
3. Please take a moment to check that your issue doesn't already exist.
16-
4. Make sure it's not mentioned in the FAQ (https://docs.gitea.io/en-us/faq)
16+
4. Make sure it's not mentioned in the FAQ (https://docs.gitea.com/help/faq)
1717
5. Please give all relevant information below for bug reports, because
1818
incomplete details will be handled as an invalid report.
1919
6. In particular it's really important to provide pertinent logs. If you are certain that this is a javascript
2020
error, show us the javascript console. If the error appears to relate to Gitea the server you must also give us
21-
DEBUG level logs. (See https://docs.gitea.io/en-us/logging-configuration/#debugging-problems)
21+
DEBUG level logs. (See https://docs.gitea.com/administration/logging-config#collecting-logs-for-help)
2222
- type: textarea
2323
id: description
2424
attributes:

.github/workflows/files-changed.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ jobs:
4343
- "go.mod"
4444
- "go.sum"
4545
- "Makefile"
46+
- ".golangci.yml"
47+
- ".editorconfig"
4648
4749
frontend:
4850
- "**/*.js"
@@ -51,16 +53,21 @@ jobs:
5153
- "package.json"
5254
- "package-lock.json"
5355
- "Makefile"
56+
- ".eslintrc.yaml"
57+
- ".stylelintrc.yaml"
58+
- ".npmrc"
5459
5560
docs:
5661
- "**/*.md"
5762
- "docs/**"
63+
- ".markdownlint.yaml"
5864
5965
actions:
6066
- ".github/workflows/*"
6167
6268
templates:
6369
- "templates/**/*.tmpl"
70+
- "pyproject.toml"
6471
- "poetry.lock"
6572
6673
docker:
@@ -71,3 +78,7 @@ jobs:
7178
7279
swagger:
7380
- "templates/swagger/v1_json.tmpl"
81+
- "Makefile"
82+
- "package.json"
83+
- "package-lock.json"
84+
- ".spectral.yaml"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ cpu.out
7575
/public/assets/js
7676
/public/assets/css
7777
/public/assets/fonts
78+
/public/assets/licenses.txt
7879
/public/assets/img/webpack
7980
/vendor
8081
/web_src/fomantic/node_modules

.golangci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ linters:
2929
fast: false
3030

3131
run:
32-
go: "1.20"
32+
go: "1.21"
3333
timeout: 10m
3434
skip-dirs:
3535
- node_modules
@@ -75,7 +75,7 @@ linters-settings:
7575
- name: modifies-value-receiver
7676
gofumpt:
7777
extra-rules: true
78-
lang-version: "1.20"
78+
lang-version: "1.21"
7979
depguard:
8080
rules:
8181
main:

CHANGELOG.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,25 @@ This changelog goes through all the changes that have been made in each release
44
without substantial changes to our git log; to see the highlights of what has
55
been added to each release, please refer to the [blog](https://blog.gitea.com).
66

7-
## [1.20.3](https://github.com/go-gitea/gitea/releases/tag/v1.20.3) - 2023-08-07
7+
## [1.20.3](https://github.com/go-gitea/gitea/releases/tag/v1.20.3) - 2023-08-20
88

99
* BREAKING
1010
* Fix the wrong derive path (#26271) (#26318)
1111
* SECURITY
1212
* Fix API leaking Usermail if not logged in (#25097) (#26350)
13+
* FEATURES
14+
* Add ThreadID parameter for Telegram webhooks (#25996) (#26480)
1315
* ENHANCEMENTS
16+
* Add minimum polyfill to support "relative-time-element" in PaleMoon (#26575) (#26578)
17+
* Fix dark theme highlight for "NameNamespace" (#26519) (#26527)
18+
* Detect ogg mime-type as audio or video (#26494) (#26505)
19+
* Use `object-fit: contain` for oauth2 custom icons (#26493) (#26498)
20+
* Move dropzone progress bar to bottom to show filename when uploading (#26492) (#26497)
21+
* Remove last newline from config file (#26468) (#26471)
22+
* Minio: add missing region on client initialization (#26412) (#26438)
23+
* Add pull request review request webhook event (#26401) (#26407)
24+
* Fix text truncate (#26354) (#26384)
25+
* Fix incorrect color of selected assignees when create issue (#26324) (#26372)
1426
* Display human-readable text instead of cryptic filemodes (#26352) (#26358)
1527
* Hide `last indexed SHA` when a repo could not be indexed yet (#26340) (#26345)
1628
* Fix the topic validation rule and suport dots (#26286) (#26303)
@@ -19,6 +31,23 @@ been added to each release, please refer to the [blog](https://blog.gitea.com).
1931
* Fix commit compare style (#26209) (#26226)
2032
* Warn instead of reporting an error when a webhook cannot be found (#26039) (#26211)
2133
* BUGFIXES
34+
* Use "input" event instead of "keyup" event for migration form (#26602) (#26605)
35+
* Do not use deprecated log config options by default (#26592) (#26600)
36+
* Fix "issueReposQueryPattern does not match query" (#26556) (#26564)
37+
* Sync repo's IsEmpty status correctly (#26517) (#26560)
38+
* Fix project filter bugs (#26490) (#26558)
39+
* Use `hidden` over `clip` for text truncation (#26520) (#26522)
40+
* Set "type=button" for editor's toolbar buttons (#26510) (#26518)
41+
* Fix NuGet search endpoints (#25613) (#26499)
42+
* Fix storage path logic especially for relative paths (#26441) (#26481)
43+
* Close stdout correctly for "git blame" (#26470) (#26473)
44+
* Check first if minio bucket exists before trying to create it (#26420) (#26465)
45+
* Avoiding accessing undefined tributeValues #26461 (#26462)
46+
* Call git.InitSimple for runRepoSyncReleases (#26396) (#26450)
47+
* Add transaction when creating pull request created dirty data (#26259) (#26437)
48+
* Fix wrong middleware sequence (#26428) (#26436)
49+
* Fix admin queue page title and fix CI failures (#26409) (#26421)
50+
* Introduce ctx.PathParamRaw to avoid incorrect unescaping (#26392) (#26405)
2251
* Bypass MariaDB performance bug of the "IN" sub-query, fix incorrect IssueIndex (#26279) (#26368)
2352
* Fix incorrect CLI exit code and duplicate error message (#26346) (#26347)
2453
* Prevent newline errors with Debian packages (#26332) (#26342)
@@ -31,6 +60,8 @@ been added to each release, please refer to the [blog](https://blog.gitea.com).
3160
* Fix attachment clipboard copy on insecure origin (#26224) (#26231)
3261
* Fix access check for org-level project (#26182) (#26223)
3362
* MISC
63+
* Improve profile readme rendering (#25988) (#26453)
64+
* [docs] Add missing backtick in quickstart.zh-cn.md (#26349) (#26357)
3465
* Upgrade x/net to 0.13.0 (#26301)
3566

3667
## [1.20.2](https://github.com/go-gitea/gitea/releases/tag/v1.20.2) - 2023-07-29

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
## Introduction
6161

6262
This document explains how to contribute changes to the Gitea project. \
63-
It assumes you have followed the [installation instructions](https://docs.gitea.io/en-us/). \
63+
It assumes you have followed the [installation instructions](https://docs.gitea.com/category/installation). \
6464
Sensitive security-related issues should be reported to [security@gitea.io](mailto:security@gitea.io).
6565

6666
For configuring IDEs for Gitea development, see the [contributed IDE configurations](contrib/ide/).

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Build stage
2-
FROM docker.io/library/golang:1.20-alpine3.18 AS build-env
2+
FROM docker.io/library/golang:1.21-alpine3.18 AS build-env
33

44
ARG GOPROXY
55
ENV GOPROXY ${GOPROXY:-direct}

Dockerfile.rootless

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Build stage
2-
FROM docker.io/library/golang:1.20-alpine3.18 AS build-env
2+
FROM docker.io/library/golang:1.21-alpine3.18 AS build-env
33

44
ARG GOPROXY
55
ENV GOPROXY ${GOPROXY:-direct}

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ SHASUM ?= shasum -a 256
2323
HAS_GO := $(shell hash $(GO) > /dev/null 2>&1 && echo yes)
2424
COMMA := ,
2525

26-
XGO_VERSION := go-1.20.x
26+
XGO_VERSION := go-1.21.x
2727

2828
AIR_PACKAGE ?= github.com/cosmtrek/air@v1.44.0
2929
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/cmd/editorconfig-checker@2.7.0
3030
GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.5.0
31-
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.53.3
31+
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.1
3232
GXZ_PACKAGE ?= github.com/ulikunitz/xz/cmd/gxz@v0.5.11
3333
MISSPELL_PACKAGE ?= github.com/client9/misspell/cmd/misspell@v0.3.4
3434
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@v0.30.5
3535
XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest
3636
GO_LICENSES_PACKAGE ?= github.com/google/go-licenses@v1.6.0
37-
GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@v1.0.0
37+
GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@v1.0.1
3838
ACTIONLINT_PACKAGE ?= github.com/rhysd/actionlint/cmd/actionlint@v1.6.25
3939

4040
DOCKER_IMAGE ?= gitea/gitea

README.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@ or if SQLite support is required:
7979

8080
The `build` target is split into two sub-targets:
8181

82-
- `make backend` which requires [Go Stable](https://go.dev/dl/), required version is defined in [go.mod](/go.mod).
83-
- `make frontend` which requires [Node.js LTS](https://nodejs.org/en/download/) or greater and Internet connectivity to download npm dependencies.
82+
- `make backend` which requires [Go Stable](https://go.dev/dl/), the required version is defined in [go.mod](/go.mod).
83+
- `make frontend` which requires [Node.js LTS](https://nodejs.org/en/download/) or greater.
8484

85-
When building from the official source tarballs which include pre-built frontend files, the `frontend` target will not be triggered, making it possible to build without Node.js and Internet connectivity.
85+
Internet connectivity is required to download the go and npm modules. When building from the official source tarballs which include pre-built frontend files, the `frontend` target will not be triggered, making it possible to build without Node.js.
8686

8787
Parallelism (`make -j <num>`) is not supported.
8888

89-
More info: https://docs.gitea.io/en-us/install-from-source/
89+
More info: https://docs.gitea.com/installation/install-from-source
9090

9191
## Using
9292

@@ -110,19 +110,17 @@ Translations are done through Crowdin. If you want to translate to a new languag
110110

111111
You can also just create an issue for adding a language or ask on discord on the #translation channel. If you need context or find some translation issues, you can leave a comment on the string or ask on Discord. For general translation questions there is a section in the docs. Currently a bit empty but we hope to fill it as questions pop up.
112112

113-
https://docs.gitea.io/en-us/contributing/translation-guidelines/
113+
https://docs.gitea.com/contributing/localization
114114

115115
[![Crowdin](https://badges.crowdin.net/gitea/localized.svg)](https://crowdin.com/project/gitea)
116116

117117
## Further information
118118

119-
For more information and instructions about how to install Gitea, please look at our [documentation](https://docs.gitea.io/en-us/).
119+
For more information and instructions about how to install Gitea, please look at our [documentation](https://docs.gitea.com/).
120120
If you have questions that are not covered by the documentation, you can get in contact with us on our [Discord server](https://discord.gg/Gitea) or create a post in the [discourse forum](https://discourse.gitea.io/).
121121

122122
We maintain a list of Gitea-related projects at [gitea/awesome-gitea](https://gitea.com/gitea/awesome-gitea).
123123

124-
The Hugo-based documentation theme is hosted at [gitea/theme](https://gitea.com/gitea/theme).
125-
126124
The official Gitea CLI is developed at [gitea/tea](https://gitea.com/gitea/tea).
127125

128126
## Authors
@@ -151,7 +149,6 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
151149
<a href="https://opencollective.com/gitea/sponsor/7/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/7/avatar.svg"></a>
152150
<a href="https://opencollective.com/gitea/sponsor/8/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/8/avatar.svg"></a>
153151
<a href="https://opencollective.com/gitea/sponsor/9/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/9/avatar.svg"></a>
154-
<a href="https://cynkra.com/" target="_blank"><img src="https://images.opencollective.com/cynkra/logo/square/64/192.png"></a>
155152

156153
## FAQ
157154

README_ZH.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Gitea 的首要目标是创建一个极易安装,运行非常快速,安装
6868

6969
## 文档
7070

71-
关于如何安装请访问我们的 [文档站](https://docs.gitea.io/zh-cn/),如果没有找到对应的文档,你也可以通过 [Discord - 英文](https://discord.gg/gitea) 和 QQ群 328432459 来和我们交流。
71+
关于如何安装请访问我们的 [文档站](https://docs.gitea.com/zh-cn/category/installation),如果没有找到对应的文档,你也可以通过 [Discord - 英文](https://discord.gg/gitea) 和 QQ群 328432459 来和我们交流。
7272

7373
## 贡献流程
7474

build/backport-locales.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"path/filepath"
1313
"strings"
1414

15+
"code.gitea.io/gitea/modules/container"
1516
"code.gitea.io/gitea/modules/setting"
1617
)
1718

@@ -58,7 +59,7 @@ func main() {
5859

5960
// use old en-US as the base, and copy the new translations to the old locales
6061
enUsOld := inisOld["options/locale/locale_en-US.ini"]
61-
brokenWarned := map[string]bool{}
62+
brokenWarned := make(container.Set[string])
6263
for path, iniOld := range inisOld {
6364
if iniOld == enUsOld {
6465
continue
@@ -77,7 +78,7 @@ func main() {
7778
broken := oldStr != "" && strings.Count(oldStr, "%") != strings.Count(newStr, "%")
7879
broken = broken || strings.Contains(oldStr, "\n") || strings.Contains(oldStr, "\n")
7980
if broken {
80-
brokenWarned[secOld.Name()+"."+keyEnUs.Name()] = true
81+
brokenWarned.Add(secOld.Name() + "." + keyEnUs.Name())
8182
fmt.Println("----")
8283
fmt.Printf("WARNING: skip broken locale: %s , [%s] %s\n", path, secEnUS.Name(), keyEnUs.Name())
8384
fmt.Printf("\told: %s\n", strings.ReplaceAll(oldStr, "\n", "\\n"))
@@ -103,7 +104,7 @@ func main() {
103104
broken = broken || strings.HasPrefix(str, "`\"")
104105
broken = broken || strings.Count(str, `"`)%2 == 1
105106
broken = broken || strings.Count(str, "`")%2 == 1
106-
if broken && !brokenWarned[sec.Name()+"."+key.Name()] {
107+
if broken && !brokenWarned.Contains(sec.Name()+"."+key.Name()) {
107108
fmt.Printf("WARNING: found broken locale: %s , [%s] %s\n", path, sec.Name(), key.Name())
108109
fmt.Printf("\tstr: %s\n", strings.ReplaceAll(str, "\n", "\\n"))
109110
fmt.Println("----")

build/generate-go-licenses.go

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import (
1515
"regexp"
1616
"sort"
1717
"strings"
18+
19+
"code.gitea.io/gitea/modules/container"
1820
)
1921

2022
// regexp is based on go-license, excluding README and NOTICE
@@ -55,20 +57,14 @@ func main() {
5557
// yml
5658
//
5759
// It could be removed once we have a better regex.
58-
excludedExt := map[string]bool{
59-
".gitignore": true,
60-
".go": true,
61-
".mod": true,
62-
".sum": true,
63-
".toml": true,
64-
".yml": true,
65-
}
60+
excludedExt := container.SetOf(".gitignore", ".go", ".mod", ".sum", ".toml", ".yml")
61+
6662
var paths []string
6763
err := filepath.WalkDir(base, func(path string, entry fs.DirEntry, err error) error {
6864
if err != nil {
6965
return err
7066
}
71-
if entry.IsDir() || !licenseRe.MatchString(entry.Name()) || excludedExt[filepath.Ext(entry.Name())] {
67+
if entry.IsDir() || !licenseRe.MatchString(entry.Name()) || excludedExt.Contains(filepath.Ext(entry.Name())) {
7268
return nil
7369
}
7470
paths = append(paths, path)

cmd/cert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Outputs to 'cert.pem' and 'key.pem' and will overwrite existing files.`,
4343
},
4444
&cli.IntFlag{
4545
Name: "rsa-bits",
46-
Value: 2048,
46+
Value: 3072,
4747
Usage: "Size of RSA key to generate. Ignored if --ecdsa-curve is set",
4848
},
4949
&cli.StringFlag{

0 commit comments

Comments
 (0)