Skip to content

Commit 9b2b4da

Browse files
committed
Merge remote-tracking branch 'origin/main' into zzc/dev/sidebar_board_option
Signed-off-by: a1012112796 <[email protected]>
2 parents 9207a4e + c685420 commit 9b2b4da

File tree

670 files changed

+13200
-7460
lines changed

Some content is hidden

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

670 files changed

+13200
-7460
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"ms-azuretools.vscode-docker",
2727
"vitest.explorer",
2828
"qwtel.sqlite-viewer",
29-
"GitHub.vscode-pull-request-github"
29+
"GitHub.vscode-pull-request-github",
30+
"Azurite.azurite"
3031
]
3132
}
3233
},

.eslintrc.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ reportUnusedDisableDirectives: true
44
ignorePatterns:
55
- /web_src/js/vendor
66
- /web_src/fomantic
7+
- /public/assets/js
78

89
parserOptions:
910
sourceType: module
@@ -126,19 +127,21 @@ rules:
126127
"@stylistic/js/computed-property-spacing": [2, never]
127128
"@stylistic/js/dot-location": [2, property]
128129
"@stylistic/js/eol-last": [2]
129-
"@stylistic/js/function-call-spacing": [2, never]
130130
"@stylistic/js/function-call-argument-newline": [0]
131+
"@stylistic/js/function-call-spacing": [2, never]
131132
"@stylistic/js/function-paren-newline": [0]
132133
"@stylistic/js/generator-star-spacing": [0]
133134
"@stylistic/js/implicit-arrow-linebreak": [0]
134135
"@stylistic/js/indent": [2, 2, {ignoreComments: true, SwitchCase: 1}]
135136
"@stylistic/js/key-spacing": [2]
136137
"@stylistic/js/keyword-spacing": [2]
138+
"@stylistic/js/line-comment-position": [0]
137139
"@stylistic/js/linebreak-style": [2, unix]
138140
"@stylistic/js/lines-around-comment": [0]
139141
"@stylistic/js/lines-between-class-members": [0]
140142
"@stylistic/js/max-len": [0]
141143
"@stylistic/js/max-statements-per-line": [0]
144+
"@stylistic/js/multiline-comment-style": [0]
142145
"@stylistic/js/multiline-ternary": [0]
143146
"@stylistic/js/new-parens": [2]
144147
"@stylistic/js/newline-per-chained-call": [0]
@@ -704,6 +707,7 @@ rules:
704707
unicorn/better-regex: [0]
705708
unicorn/catch-error-name: [0]
706709
unicorn/consistent-destructuring: [2]
710+
unicorn/consistent-empty-array-spread: [2]
707711
unicorn/consistent-function-scoping: [2]
708712
unicorn/custom-error-definition: [0]
709713
unicorn/empty-brace-spaces: [2]
@@ -730,9 +734,11 @@ rules:
730734
unicorn/no-for-loop: [0]
731735
unicorn/no-hex-escape: [0]
732736
unicorn/no-instanceof-array: [0]
737+
unicorn/no-invalid-fetch-options: [2]
733738
unicorn/no-invalid-remove-event-listener: [2]
734739
unicorn/no-keyword-prefix: [0]
735740
unicorn/no-lonely-if: [2]
741+
unicorn/no-magic-array-flat-depth: [0]
736742
unicorn/no-negated-condition: [0]
737743
unicorn/no-nested-ternary: [0]
738744
unicorn/no-new-array: [0]
@@ -798,10 +804,12 @@ rules:
798804
unicorn/prefer-set-has: [0]
799805
unicorn/prefer-set-size: [2]
800806
unicorn/prefer-spread: [0]
807+
unicorn/prefer-string-raw: [0]
801808
unicorn/prefer-string-replace-all: [0]
802809
unicorn/prefer-string-slice: [0]
803810
unicorn/prefer-string-starts-ends-with: [2]
804811
unicorn/prefer-string-trim-start-end: [2]
812+
unicorn/prefer-structured-clone: [2]
805813
unicorn/prefer-switch: [0]
806814
unicorn/prefer-ternary: [0]
807815
unicorn/prefer-text-content: [2]

.gitea/issue_template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<!--
44
1. Please speak English, this is the language all maintainers can speak and write.
55
2. Please ask questions or configuration/deploy problems on our Discord
6-
server (https://discord.gg/gitea) or forum (https://discourse.gitea.io).
6+
server (https://discord.gg/gitea) or forum (https://forum.gitea.com).
77
3. Please take a moment to check that your issue doesn't already exist.
88
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
@@ -21,7 +21,7 @@
2121
- [ ] MySQL
2222
- [ ] MSSQL
2323
- [ ] SQLite
24-
- Can you reproduce the bug at https://try.gitea.io:
24+
- Can you reproduce the bug at https://demo.gitea.com:
2525
- [ ] Yes (provide example URL)
2626
- [ ] No
2727
- Log gist:

.github/ISSUE_TEMPLATE/bug-report.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ body:
3737
label: Can you reproduce the bug on the Gitea demo site?
3838
description: |
3939
If so, please provide a URL in the Description field
40-
URL of Gitea demo: https://try.gitea.io
40+
URL of Gitea demo: https://demo.gitea.com
4141
options:
4242
- "Yes"
4343
- "No"
@@ -74,7 +74,7 @@ body:
7474
attributes:
7575
label: How are you running Gitea?
7676
description: |
77-
Please include information on whether you built Gitea yourself, used one of our downloads, are using https://try.gitea.io or are using some other package
77+
Please include information on whether you built Gitea yourself, used one of our downloads, are using https://demo.gitea.com or are using some other package
7878
Please also tell us how you are running Gitea, e.g. if it is being run from docker, a command-line, systemd etc.
7979
If you are using a package or systemd tell us what distribution you are using
8080
validations:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ body:
4646
label: Can you reproduce the bug on the Gitea demo site?
4747
description: |
4848
If so, please provide a URL in the Description field
49-
URL of Gitea demo: https://try.gitea.io
49+
URL of Gitea demo: https://demo.gitea.com
5050
options:
5151
- "Yes"
5252
- "No"

.github/workflows/disk-clean.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/pull-db-tests.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,18 @@ jobs:
119119
MINIO_SECRET_KEY: 12345678
120120
ports:
121121
- "9000:9000"
122+
devstoreaccount1.azurite.local: # https://github.com/Azure/Azurite/issues/1583
123+
image: mcr.microsoft.com/azure-storage/azurite:latest
124+
ports:
125+
- 10000:10000
122126
steps:
123127
- uses: actions/checkout@v4
124128
- uses: actions/setup-go@v5
125129
with:
126130
go-version-file: go.mod
127131
check-latest: true
128132
- name: Add hosts to /etc/hosts
129-
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mysql elasticsearch meilisearch smtpimap" | sudo tee -a /etc/hosts'
133+
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 minio devstoreaccount1.azurite.local mysql elasticsearch meilisearch smtpimap" | sudo tee -a /etc/hosts'
130134
- run: make deps-backend
131135
- run: make backend
132136
env:
@@ -204,14 +208,18 @@ jobs:
204208
SA_PASSWORD: MwantsaSecurePassword1
205209
ports:
206210
- "1433:1433"
211+
devstoreaccount1.azurite.local: # https://github.com/Azure/Azurite/issues/1583
212+
image: mcr.microsoft.com/azure-storage/azurite:latest
213+
ports:
214+
- 10000:10000
207215
steps:
208216
- uses: actions/checkout@v4
209217
- uses: actions/setup-go@v5
210218
with:
211219
go-version-file: go.mod
212220
check-latest: true
213221
- name: Add hosts to /etc/hosts
214-
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mssql" | sudo tee -a /etc/hosts'
222+
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mssql devstoreaccount1.azurite.local" | sudo tee -a /etc/hosts'
215223
- run: make deps-backend
216224
- run: make backend
217225
env:

.github/workflows/release-nightly.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ concurrency:
99
cancel-in-progress: true
1010

1111
jobs:
12-
disk-clean:
13-
uses: ./.github/workflows/disk-clean.yml
1412
nightly-binary:
1513
runs-on: nscloud
1614
steps:
@@ -49,7 +47,7 @@ jobs:
4947
run: |
5048
REF_NAME=$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\///' -e 's/refs\/tags\///' -e 's/release\/v//')
5149
echo "Cleaned name is ${REF_NAME}"
52-
echo "branch=${REF_NAME}" >> "$GITHUB_OUTPUT"
50+
echo "branch=${REF_NAME}-nightly" >> "$GITHUB_OUTPUT"
5351
- name: configure aws
5452
uses: aws-actions/configure-aws-credentials@v4
5553
with:

.golangci.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ run:
2929

3030
output:
3131
sort-results: true
32+
sort-order: [file]
33+
show-stats: true
3234

3335
linters-settings:
3436
stylecheck:
@@ -40,11 +42,7 @@ linters-settings:
4042
- ifElseChain
4143
- singleCaseSwitch # Every time this occurred in the code, there was no other way.
4244
revive:
43-
ignore-generated-header: false
44-
severity: warning
45-
confidence: 0.8
46-
errorCode: 1
47-
warningCode: 1
45+
severity: error
4846
rules:
4947
- name: atomic
5048
- name: bare-return

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ If your issue has not been reported yet, [open an issue](https://github.com/go-g
7777
and answer the questions so we can understand and reproduce the problematic behavior. \
7878
Please write clear and concise instructions so that we can reproduce the behavior — even if it seems obvious. \
7979
The more detailed and specific you are, the faster we can fix the issue. \
80-
It is really helpful if you can reproduce your problem on a site running on the latest commits, i.e. <https://try.gitea.io>, as perhaps your problem has already been fixed on a current version. \
80+
It is really helpful if you can reproduce your problem on a site running on the latest commits, i.e. <https://demo.gitea.com>, as perhaps your problem has already been fixed on a current version. \
8181
Please follow the guidelines described in [How to Report Bugs Effectively](http://www.chiark.greenend.org.uk/~sgtatham/bugs.html) for your report.
8282

8383
Please be kind, remember that Gitea comes at no cost to you, and you're getting free help.
@@ -362,7 +362,7 @@ If you add a new feature or change an existing aspect of Gitea, the documentatio
362362

363363
## API v1
364364

365-
The API is documented by [swagger](http://try.gitea.io/api/swagger) and is based on [the GitHub API](https://docs.github.com/en/rest).
365+
The API is documented by [swagger](https://gitea.com/api/swagger) and is based on [the GitHub API](https://docs.github.com/en/rest).
366366

367367
### GitHub API compatibility
368368

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build stage
2-
FROM docker.io/library/golang:1.22-alpine3.19 AS build-env
2+
FROM docker.io/library/golang:1.22-alpine3.20 AS build-env
33

44
ARG GOPROXY
55
ENV GOPROXY ${GOPROXY:-direct}
@@ -41,7 +41,7 @@ RUN chmod 755 /tmp/local/usr/bin/entrypoint \
4141
/go/src/code.gitea.io/gitea/environment-to-ini
4242
RUN chmod 644 /go/src/code.gitea.io/gitea/contrib/autocompletion/bash_autocomplete
4343

44-
FROM docker.io/library/alpine:3.19
44+
FROM docker.io/library/alpine:3.20
4545
LABEL maintainer="[email protected]"
4646

4747
EXPOSE 22 3000

Dockerfile.rootless

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build stage
2-
FROM docker.io/library/golang:1.22-alpine3.19 AS build-env
2+
FROM docker.io/library/golang:1.22-alpine3.20 AS build-env
33

44
ARG GOPROXY
55
ENV GOPROXY ${GOPROXY:-direct}
@@ -39,7 +39,7 @@ RUN chmod 755 /tmp/local/usr/local/bin/docker-entrypoint.sh \
3939
/go/src/code.gitea.io/gitea/environment-to-ini
4040
RUN chmod 644 /go/src/code.gitea.io/gitea/contrib/autocompletion/bash_autocomplete
4141

42-
FROM docker.io/library/alpine:3.19
42+
FROM docker.io/library/alpine:3.20
4343
LABEL maintainer="[email protected]"
4444

4545
EXPOSE 2222 3000

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,4 @@ kerwin612 <[email protected]> (@kerwin612)
6161
Gary Wang <[email protected]> (@BLumia)
6262
Tim-Niclas Oelschläger <[email protected]> (@zokkis)
6363
Yu Liu <[email protected]> (@HEREYUA)
64+
Kemal Zebari <[email protected]> (@kemzeb)

Makefile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-che
3030
GOFUMPT_PACKAGE ?= mvdan.cc/[email protected]
3131
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/[email protected]
3232
GXZ_PACKAGE ?= github.com/ulikunitz/xz/cmd/[email protected]
33-
MISSPELL_PACKAGE ?= github.com/golangci/misspell/cmd/misspell@v0.4.1
33+
MISSPELL_PACKAGE ?= github.com/golangci/misspell/cmd/misspell@v0.5.1
3434
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@db51e79a0e37c572d8b59ae0c58bf2bbbbe53285
3535
XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest
3636
GO_LICENSES_PACKAGE ?= github.com/google/go-licenses@v1
@@ -88,7 +88,7 @@ ifneq ($(GITHUB_REF_TYPE),branch)
8888
GITEA_VERSION ?= $(VERSION)
8989
else
9090
ifneq ($(GITHUB_REF_NAME),)
91-
VERSION ?= $(subst release/v,,$(GITHUB_REF_NAME))
91+
VERSION ?= $(subst release/v,,$(GITHUB_REF_NAME))-nightly
9292
else
9393
VERSION ?= main
9494
endif
@@ -397,11 +397,11 @@ lint-md: node_modules
397397

398398
.PHONY: lint-spell
399399
lint-spell:
400-
@go run $(MISSPELL_PACKAGE) -error $(SPELLCHECK_FILES)
400+
@go run $(MISSPELL_PACKAGE) -dict tools/misspellings.csv -error $(SPELLCHECK_FILES)
401401

402402
.PHONY: lint-spell-fix
403403
lint-spell-fix:
404-
@go run $(MISSPELL_PACKAGE) -w $(SPELLCHECK_FILES)
404+
@go run $(MISSPELL_PACKAGE) -dict tools/misspellings.csv -w $(SPELLCHECK_FILES)
405405

406406
.PHONY: lint-go
407407
lint-go:
@@ -778,7 +778,7 @@ generate-backend: $(TAGS_PREREQ) generate-go
778778
.PHONY: generate-go
779779
generate-go: $(TAGS_PREREQ)
780780
@echo "Running go generate..."
781-
@CC= GOOS= GOARCH= $(GO) generate -tags '$(TAGS)' ./...
781+
@CC= GOOS= GOARCH= CGO_ENABLED=0 $(GO) generate -tags '$(TAGS)' ./...
782782

783783
.PHONY: security-check
784784
security-check:
@@ -908,8 +908,9 @@ webpack: $(WEBPACK_DEST)
908908

909909
$(WEBPACK_DEST): $(WEBPACK_SOURCES) $(WEBPACK_CONFIGS) package-lock.json
910910
@$(MAKE) -s node-check node_modules
911-
rm -rf $(WEBPACK_DEST_ENTRIES)
912-
npx webpack
911+
@rm -rf $(WEBPACK_DEST_ENTRIES)
912+
@echo "Running webpack..."
913+
@BROWSERSLIST_IGNORE_OLD_DATA=true npx webpack
913914
@touch $(WEBPACK_DEST)
914915

915916
.PHONY: svg

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ This project has been
2626
[forked](https://blog.gitea.com/welcome-to-gitea/) from
2727
[Gogs](https://gogs.io) since November of 2016, but a lot has changed.
2828

29-
For online demonstrations, you can visit [try.gitea.io](https://try.gitea.io).
29+
For online demonstrations, you can visit [demo.gitea.com](https://demo.gitea.com).
3030

3131
For accessing free Gitea service (with a limited number of repositories), you can visit [gitea.com](https://gitea.com/user/login).
3232

@@ -56,7 +56,7 @@ More info: https://docs.gitea.com/installation/install-from-source
5656
./gitea web
5757

5858
> [!NOTE]
59-
> If you're interested in using our APIs, we have experimental support with [documentation](https://try.gitea.io/api/swagger).
59+
> If you're interested in using our APIs, we have experimental support with [documentation](https://docs.gitea.com/api).
6060
6161
## Contributing
6262

@@ -80,7 +80,7 @@ https://docs.gitea.com/contributing/localization
8080
## Further information
8181

8282
For more information and instructions about how to install Gitea, please look at our [documentation](https://docs.gitea.com/).
83-
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/).
83+
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://forum.gitea.com/).
8484

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

README_ZH.md

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

1919
Gitea 的首要目标是创建一个极易安装,运行非常快速,安装和使用体验良好的自建 Git 服务。我们采用 Go 作为后端语言,这使我们只要生成一个可执行程序即可。并且他还支持跨平台,支持 Linux, macOS 和 Windows 以及各种架构,除了 x86,amd64,还包括 ARM 和 PowerPC。
2020

21-
如果你想试用在线演示,请访问 [try.gitea.io](https://try.gitea.io/)
21+
如果你想试用在线演示和报告问题,请访问 [demo.gitea.com](https://demo.gitea.com/)
2222

2323
如果你想使用免费的 Gitea 服务(有仓库数量限制),请访问 [gitea.com](https://gitea.com/user/login)
2424

0 commit comments

Comments
 (0)