Skip to content

Commit 2b99cde

Browse files
committed
Merge branch 'main' into lunny/fix_unprotected_files_bug
2 parents dc91497 + df05c55 commit 2b99cde

File tree

1,813 files changed

+38792
-19038
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,813 files changed

+38792
-19038
lines changed

.devcontainer/devcontainer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
{
22
"name": "Gitea DevContainer",
3-
"image": "mcr.microsoft.com/devcontainers/go:1.21-bullseye",
3+
"image": "mcr.microsoft.com/devcontainers/go:1.22-bullseye",
44
"features": {
55
// installs nodejs into container
66
"ghcr.io/devcontainers/features/node:1": {
77
"version":"20"
88
},
99
"ghcr.io/devcontainers/features/git-lfs:1.1.0": {},
1010
"ghcr.io/devcontainers-contrib/features/poetry:2": {},
11-
"ghcr.io/devcontainers/features/python:1": {}
11+
"ghcr.io/devcontainers/features/python:1": {
12+
"version": "3.12"
13+
}
1214
},
1315
"customizations": {
1416
"vscode": {

.eslintrc.yaml

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ plugins:
1212
- "@eslint-community/eslint-plugin-eslint-comments"
1313
- "@stylistic/eslint-plugin-js"
1414
- eslint-plugin-array-func
15+
- eslint-plugin-github
1516
- eslint-plugin-i
1617
- eslint-plugin-jquery
1718
- eslint-plugin-no-jquery
@@ -209,6 +210,29 @@ rules:
209210
func-names: [0]
210211
func-style: [0]
211212
getter-return: [2]
213+
github/a11y-aria-label-is-well-formatted: [0]
214+
github/a11y-no-title-attribute: [0]
215+
github/a11y-no-visually-hidden-interactive-element: [0]
216+
github/a11y-role-supports-aria-props: [0]
217+
github/a11y-svg-has-accessible-name: [0]
218+
github/array-foreach: [0]
219+
github/async-currenttarget: [2]
220+
github/async-preventdefault: [2]
221+
github/authenticity-token: [0]
222+
github/get-attribute: [0]
223+
github/js-class-name: [0]
224+
github/no-blur: [0]
225+
github/no-d-none: [0]
226+
github/no-dataset: [2]
227+
github/no-dynamic-script-tag: [2]
228+
github/no-implicit-buggy-globals: [2]
229+
github/no-inner-html: [0]
230+
github/no-innerText: [2]
231+
github/no-then: [2]
232+
github/no-useless-passive: [2]
233+
github/prefer-observers: [2]
234+
github/require-passive-events: [2]
235+
github/unescaped-html-literal: [0]
212236
grouped-accessor-pairs: [2]
213237
guard-for-in: [0]
214238
id-blacklist: [0]
@@ -259,7 +283,7 @@ rules:
259283
i/unambiguous: [0]
260284
init-declarations: [0]
261285
jquery/no-ajax-events: [2]
262-
jquery/no-ajax: [0]
286+
jquery/no-ajax: [2]
263287
jquery/no-animate: [2]
264288
jquery/no-attr: [0]
265289
jquery/no-bind: [2]
@@ -272,7 +296,7 @@ rules:
272296
jquery/no-delegate: [2]
273297
jquery/no-each: [0]
274298
jquery/no-extend: [2]
275-
jquery/no-fade: [0]
299+
jquery/no-fade: [2]
276300
jquery/no-filter: [0]
277301
jquery/no-find: [0]
278302
jquery/no-global-eval: [2]
@@ -285,13 +309,13 @@ rules:
285309
jquery/no-is-function: [2]
286310
jquery/no-is: [0]
287311
jquery/no-load: [2]
288-
jquery/no-map: [0]
312+
jquery/no-map: [2]
289313
jquery/no-merge: [2]
290314
jquery/no-param: [2]
291315
jquery/no-parent: [0]
292316
jquery/no-parents: [0]
293317
jquery/no-parse-html: [2]
294-
jquery/no-prop: [0]
318+
jquery/no-prop: [2]
295319
jquery/no-proxy: [2]
296320
jquery/no-ready: [2]
297321
jquery/no-serialize: [2]
@@ -372,11 +396,11 @@ rules:
372396
no-irregular-whitespace: [2]
373397
no-iterator: [2]
374398
no-jquery/no-ajax-events: [2]
375-
no-jquery/no-ajax: [0]
399+
no-jquery/no-ajax: [2]
376400
no-jquery/no-and-self: [2]
377401
no-jquery/no-animate-toggle: [2]
378402
no-jquery/no-animate: [2]
379-
no-jquery/no-append-html: [0]
403+
no-jquery/no-append-html: [2]
380404
no-jquery/no-attr: [0]
381405
no-jquery/no-bind: [2]
382406
no-jquery/no-box-model: [2]
@@ -427,7 +451,7 @@ rules:
427451
no-jquery/no-load: [2]
428452
no-jquery/no-map-collection: [0]
429453
no-jquery/no-map-util: [2]
430-
no-jquery/no-map: [0]
454+
no-jquery/no-map: [2]
431455
no-jquery/no-merge: [2]
432456
no-jquery/no-node-name: [2]
433457
no-jquery/no-noop: [2]
@@ -442,7 +466,7 @@ rules:
442466
no-jquery/no-parse-html: [2]
443467
no-jquery/no-parse-json: [2]
444468
no-jquery/no-parse-xml: [2]
445-
no-jquery/no-prop: [0]
469+
no-jquery/no-prop: [2]
446470
no-jquery/no-proxy: [2]
447471
no-jquery/no-ready-shorthand: [2]
448472
no-jquery/no-ready: [2]
@@ -463,7 +487,7 @@ rules:
463487
no-jquery/no-visibility: [2]
464488
no-jquery/no-when: [2]
465489
no-jquery/no-wrap: [2]
466-
no-jquery/variable-pattern: [0]
490+
no-jquery/variable-pattern: [2]
467491
no-label-var: [2]
468492
no-labels: [0] # handled by no-restricted-syntax
469493
no-lone-blocks: [2]
@@ -558,7 +582,6 @@ rules:
558582
prefer-rest-params: [2]
559583
prefer-spread: [2]
560584
prefer-template: [2]
561-
quotes: [2, single, {avoidEscape: true, allowTemplateLiterals: true}]
562585
radix: [2, as-needed]
563586
regexp/confusing-quantifier: [2]
564587
regexp/control-character-escape: [2]
@@ -723,6 +746,7 @@ rules:
723746
unicorn/no-this-assignment: [2]
724747
unicorn/no-typeof-undefined: [2]
725748
unicorn/no-unnecessary-await: [2]
749+
unicorn/no-unnecessary-polyfills: [2]
726750
unicorn/no-unreadable-array-destructuring: [0]
727751
unicorn/no-unreadable-iife: [2]
728752
unicorn/no-unused-properties: [2]
@@ -810,7 +834,7 @@ rules:
810834
wc/no-constructor-params: [2]
811835
wc/no-constructor: [2]
812836
wc/no-customized-built-in-elements: [2]
813-
wc/no-exports-with-element: [2]
837+
wc/no-exports-with-element: [0]
814838
wc/no-invalid-element-name: [2]
815839
wc/no-invalid-extends: [2]
816840
wc/no-method-prefixed-with-on: [2]

.github/FUNDING.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
open_collective: gitea
2-
custom: https://www.bountysource.com/teams/gitea

.github/labeler.yml

Lines changed: 69 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,84 @@
11
modifies/docs:
2-
- "**/*.md"
3-
- "docs/**"
2+
- changed-files:
3+
- any-glob-to-any-file:
4+
- "**/*.md"
5+
- "docs/**"
46

57
modifies/frontend:
6-
- "web_src/**/*"
8+
- changed-files:
9+
- any-glob-to-any-file:
10+
- "web_src/**"
11+
- "tailwind.config.js"
12+
- "webpack.config.js"
713

814
modifies/templates:
9-
- all: ["templates/**", "!templates/swagger/v1_json.tmpl"]
15+
- changed-files:
16+
- all-globs-to-any-file:
17+
- "templates/**"
18+
- "!templates/swagger/v1_json.tmpl"
1019

1120
modifies/api:
12-
- "routers/api/**"
13-
- "templates/swagger/v1_json.tmpl"
21+
- changed-files:
22+
- any-glob-to-any-file:
23+
- "routers/api/**"
24+
- "templates/swagger/v1_json.tmpl"
1425

1526
modifies/cli:
16-
- "cmd/**"
27+
- changed-files:
28+
- any-glob-to-any-file:
29+
- "cmd/**"
1730

1831
modifies/translation:
19-
- "options/locale/*.ini"
32+
- changed-files:
33+
- any-glob-to-any-file:
34+
- "options/locale/*.ini"
2035

2136
modifies/migrations:
22-
- "models/migrations/**/*"
37+
- changed-files:
38+
- any-glob-to-any-file:
39+
- "models/migrations/**"
2340

2441
modifies/internal:
25-
- "Makefile"
26-
- "Dockerfile"
27-
- "Dockerfile.rootless"
28-
- "docker/**"
29-
- "webpack.config.js"
30-
- ".eslintrc.yaml"
31-
- ".golangci.yml"
32-
- ".markdownlint.yaml"
33-
- ".spectral.yaml"
34-
- ".stylelintrc.yaml"
35-
- ".yamllint.yaml"
36-
- ".github/**"
42+
- changed-files:
43+
- any-glob-to-any-file:
44+
- ".air.toml"
45+
- "Makefile"
46+
- "Dockerfile"
47+
- "Dockerfile.rootless"
48+
- ".dockerignore"
49+
- "docker/**"
50+
- ".editorconfig"
51+
- ".eslintrc.yaml"
52+
- ".golangci.yml"
53+
- ".gitpod.yml"
54+
- ".markdownlint.yaml"
55+
- ".spectral.yaml"
56+
- ".stylelintrc.yaml"
57+
- ".yamllint.yaml"
58+
- ".github/**"
59+
- ".gitea/"
60+
- ".devcontainer/**"
61+
- "build.go"
62+
- "build/**"
63+
- "contrib/**"
64+
65+
modifies/dependencies:
66+
- changed-files:
67+
- any-glob-to-any-file:
68+
- "package.json"
69+
- "package-lock.json"
70+
- "pyproject.toml"
71+
- "poetry.lock"
72+
- "go.mod"
73+
- "go.sum"
74+
75+
modifies/go:
76+
- changed-files:
77+
- any-glob-to-any-file:
78+
- "**/*.go"
79+
80+
modifies/js:
81+
- changed-files:
82+
- any-glob-to-any-file:
83+
- "**/*.js"
84+
- "**/*.vue"

.github/workflows/cron-lock.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ jobs:
1919
steps:
2020
- uses: dessant/lock-threads@v5
2121
with:
22-
issue-inactive-days: 45
22+
issue-inactive-days: 10
23+
pr-inactive-days: 7

.github/workflows/files-changed.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
yaml: ${{ steps.changes.outputs.yaml }}
3636
steps:
3737
- uses: actions/checkout@v4
38-
- uses: dorny/paths-filter@v2
38+
- uses: dorny/paths-filter@v3
3939
id: changes
4040
with:
4141
filters: |
@@ -48,6 +48,7 @@ jobs:
4848
- "Makefile"
4949
- ".golangci.yml"
5050
- ".editorconfig"
51+
- "options/locale/locale_en-US.ini"
5152
5253
frontend:
5354
- "**/*.js"

.github/workflows/pull-compliance.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ jobs:
3232
runs-on: ubuntu-latest
3333
steps:
3434
- uses: actions/checkout@v4
35-
- uses: actions/setup-python@v4
35+
- uses: actions/setup-python@v5
3636
with:
37-
python-version: "3.11"
37+
python-version: "3.12"
3838
- run: pip install poetry
3939
- run: make deps-py
4040
- run: make lint-templates
@@ -45,9 +45,9 @@ jobs:
4545
runs-on: ubuntu-latest
4646
steps:
4747
- uses: actions/checkout@v4
48-
- uses: actions/setup-python@v4
48+
- uses: actions/setup-python@v5
4949
with:
50-
python-version: "3.11"
50+
python-version: "3.12"
5151
- run: pip install poetry
5252
- run: make deps-py
5353
- run: make lint-yaml
@@ -64,6 +64,18 @@ jobs:
6464
- run: make deps-frontend
6565
- run: make lint-swagger
6666

67+
lint-spell:
68+
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.frontend == 'true' || needs.files-changed.outputs.actions == 'true' || needs.files-changed.outputs.docs == 'true' || needs.files-changed.outputs.templates == 'true'
69+
needs: files-changed
70+
runs-on: ubuntu-latest
71+
steps:
72+
- uses: actions/checkout@v4
73+
- uses: actions/setup-go@v5
74+
with:
75+
go-version-file: go.mod
76+
check-latest: true
77+
- run: make lint-spell
78+
6779
lint-go-windows:
6880
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
6981
needs: files-changed

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

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ jobs:
4949
- run: make backend
5050
env:
5151
TAGS: bindata
52-
- run: make test-pgsql-migration test-pgsql
52+
- name: run migration tests
53+
run: make test-pgsql-migration
54+
- name: run tests
55+
run: make test-pgsql
5356
timeout-minutes: 50
5457
env:
5558
TAGS: bindata gogit
@@ -72,7 +75,10 @@ jobs:
7275
- run: make backend
7376
env:
7477
TAGS: bindata gogit sqlite sqlite_unlock_notify
75-
- run: make test-sqlite-migration test-sqlite
78+
- name: run migration tests
79+
run: make test-sqlite-migration
80+
- name: run tests
81+
run: make test-sqlite
7682
timeout-minutes: 50
7783
env:
7884
TAGS: bindata gogit sqlite sqlite_unlock_notify
@@ -175,8 +181,10 @@ jobs:
175181
- run: make backend
176182
env:
177183
TAGS: bindata
184+
- name: run migration tests
185+
run: make test-mysql-migration
178186
- name: run tests
179-
run: make test-mysql-migration integration-test-coverage
187+
run: make integration-test-coverage
180188
env:
181189
TAGS: bindata
182190
RACE_ENABLED: true
@@ -208,7 +216,9 @@ jobs:
208216
- run: make backend
209217
env:
210218
TAGS: bindata
211-
- run: make test-mssql-migration test-mssql
219+
- run: make test-mssql-migration
220+
- name: run tests
221+
run: make test-mssql
212222
timeout-minutes: 50
213223
env:
214224
TAGS: bindata

.github/workflows/pull-labeler.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ concurrency:
99
cancel-in-progress: true
1010

1111
jobs:
12-
label:
12+
labeler:
1313
runs-on: ubuntu-latest
1414
permissions:
1515
contents: read
1616
pull-requests: write
1717
steps:
18-
- uses: actions/labeler@v4
18+
- uses: actions/labeler@v5
1919
with:
20-
dot: true
20+
sync-labels: true

0 commit comments

Comments
 (0)