Skip to content

Commit dd20d7d

Browse files
committed
Merge remote-tracking branch 'upstream/main' into sync-issue-pr-and-more
2 parents 8874bf5 + 353a533 commit dd20d7d

File tree

652 files changed

+16243
-8468
lines changed

Some content is hidden

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

652 files changed

+16243
-8468
lines changed

.air.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ bin = "gitea"
77
include_ext = ["go", "tmpl"]
88
exclude_dir = ["modules/git/tests", "services/gitdiff/testdata", "modules/avatar/testdata"]
99
include_dir = ["cmd", "models", "modules", "options", "routers", "services", "templates"]
10-
exclude_regex = ["_test.go$"]
10+
exclude_regex = ["_test.go$", "_gen.go$"]

.drone.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ steps:
2525
- make deps-frontend
2626

2727
- name: deps-backend
28-
image: golang:1.18
28+
image: golang:1.19
2929
pull: always
3030
commands:
3131
- make deps-backend
@@ -88,7 +88,7 @@ steps:
8888
depends_on: [deps-frontend]
8989

9090
- name: checks-backend
91-
image: golang:1.18
91+
image: golang:1.19
9292
commands:
9393
- make checks-backend
9494
depends_on: [deps-backend]
@@ -122,7 +122,7 @@ steps:
122122
path: /go
123123

124124
- name: build-backend-arm64
125-
image: golang:1.18
125+
image: golang:1.19
126126
environment:
127127
GO111MODULE: on
128128
GOPROXY: https://goproxy.io
@@ -138,7 +138,7 @@ steps:
138138
path: /go
139139

140140
- name: build-backend-windows
141-
image: golang:1.18
141+
image: golang:1.19
142142
environment:
143143
GO111MODULE: on
144144
GOPROXY: https://goproxy.io
@@ -153,7 +153,7 @@ steps:
153153
path: /go
154154

155155
- name: build-backend-386
156-
image: golang:1.18
156+
image: golang:1.19
157157
environment:
158158
GO111MODULE: on
159159
GOPROXY: https://goproxy.io
@@ -243,7 +243,7 @@ steps:
243243
- pull_request
244244

245245
- name: deps-backend
246-
image: golang:1.18
246+
image: golang:1.19
247247
pull: always
248248
commands:
249249
- make deps-backend
@@ -360,7 +360,7 @@ steps:
360360
path: /go
361361

362362
- name: generate-coverage
363-
image: golang:1.18
363+
image: golang:1.19
364364
commands:
365365
- make coverage
366366
environment:
@@ -436,7 +436,7 @@ steps:
436436
- pull_request
437437

438438
- name: deps-backend
439-
image: golang:1.18
439+
image: golang:1.19
440440
pull: always
441441
commands:
442442
- make deps-backend
@@ -578,7 +578,7 @@ trigger:
578578

579579
steps:
580580
- name: download
581-
image: golang:1.18
581+
image: golang:1.19
582582
pull: always
583583
commands:
584584
- timeout -s ABRT 40m make generate-license generate-gitignore
@@ -640,7 +640,7 @@ steps:
640640
- make deps-frontend
641641

642642
- name: deps-backend
643-
image: golang:1.18
643+
image: golang:1.19
644644
pull: always
645645
commands:
646646
- make deps-backend
@@ -649,7 +649,7 @@ steps:
649649
path: /go
650650

651651
- name: static
652-
image: techknowlogick/xgo:go-1.18.x
652+
image: techknowlogick/xgo:go-1.19.x
653653
pull: always
654654
commands:
655655
# Upgrade to node 18 once https://github.com/techknowlogick/xgo/issues/163 is resolved
@@ -760,7 +760,7 @@ steps:
760760
- make deps-frontend
761761

762762
- name: deps-backend
763-
image: golang:1.18
763+
image: golang:1.19
764764
pull: always
765765
commands:
766766
- make deps-backend
@@ -769,7 +769,7 @@ steps:
769769
path: /go
770770

771771
- name: static
772-
image: techknowlogick/xgo:go-1.18.x
772+
image: techknowlogick/xgo:go-1.19.x
773773
pull: always
774774
commands:
775775
# Upgrade to node 18 once https://github.com/techknowlogick/xgo/issues/163 is resolved

.editorconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,3 @@ indent_style = tab
2626

2727
[*.svg]
2828
insert_final_newline = false
29-
30-
[*.md]
31-
trim_trailing_whitespace = false

.eslintrc.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ overrides:
3030
env:
3131
worker: true
3232
rules:
33-
no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, location, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, status, statusbar, stop, toolbar, top]
33+
no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, status, statusbar, stop, toolbar, top]
3434
- files: ["build/generate-images.js"]
3535
rules:
3636
import/no-unresolved: [0]
@@ -109,7 +109,7 @@ rules:
109109
import/no-extraneous-dependencies: [2]
110110
import/no-import-module-exports: [0]
111111
import/no-internal-modules: [0]
112-
import/no-mutable-exports: [2]
112+
import/no-mutable-exports: [0]
113113
import/no-named-as-default-member: [0]
114114
import/no-named-as-default: [2]
115115
import/no-named-default: [0]
@@ -121,7 +121,7 @@ rules:
121121
import/no-restricted-paths: [0]
122122
import/no-self-import: [2]
123123
import/no-unassigned-import: [0]
124-
import/no-unresolved: [2, {commonjs: true}]
124+
import/no-unresolved: [2, {commonjs: true, ignore: ["\\?.+$"]}]
125125
import/no-unused-modules: [2, {unusedExports: true}]
126126
import/no-useless-path-segments: [2, {commonjs: true}]
127127
import/no-webpack-loader-syntax: [2]
@@ -211,7 +211,7 @@ rules:
211211
no-compare-neg-zero: [2]
212212
no-cond-assign: [2, except-parens]
213213
no-confusing-arrow: [0]
214-
no-console: [1, {allow: [info, warn, error]}]
214+
no-console: [1, {allow: [debug, info, warn, error]}]
215215
no-const-assign: [2]
216216
no-constant-binary-expression: [2]
217217
no-constant-condition: [0]
@@ -287,7 +287,7 @@ rules:
287287
no-redeclare: [2]
288288
no-regex-spaces: [2]
289289
no-restricted-exports: [0]
290-
no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, location, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, self, status, statusbar, stop, toolbar, top]
290+
no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, location, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, self, status, statusbar, stop, toolbar, top, __dirname, __filename]
291291
no-restricted-imports: [0]
292292
no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement]
293293
no-return-assign: [0]
@@ -321,7 +321,7 @@ rules:
321321
no-unused-labels: [2]
322322
no-unused-private-class-members: [2]
323323
no-unused-vars: [2, {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_, caughtErrorsIgnorePattern: ^_, destructuredArrayIgnorePattern: ^_, ignoreRestSiblings: false}]
324-
no-use-before-define: [2, nofunc]
324+
no-use-before-define: [2, {functions: false, classes: true, variables: true, allowNamedExports: true}]
325325
no-useless-backreference: [0]
326326
no-useless-call: [2]
327327
no-useless-catch: [2]
@@ -347,7 +347,7 @@ rules:
347347
padded-blocks: [2, never]
348348
padding-line-between-statements: [0]
349349
prefer-arrow-callback: [2, {allowNamedFunctions: true, allowUnboundThis: true}]
350-
prefer-const: [2, {destructuring: all}]
350+
prefer-const: [2, {destructuring: all, ignoreReadBeforeAssign: true}]
351351
prefer-destructuring: [0]
352352
prefer-exponentiation-operator: [2]
353353
prefer-named-capture-group: [0]
@@ -449,7 +449,7 @@ rules:
449449
unicorn/no-new-array: [0]
450450
unicorn/no-new-buffer: [0]
451451
unicorn/no-null: [0]
452-
unicorn/no-object-as-default-parameter: [2]
452+
unicorn/no-object-as-default-parameter: [0]
453453
unicorn/no-process-exit: [0]
454454
unicorn/no-reduce: [2]
455455
unicorn/no-static-only-class: [2]
@@ -475,7 +475,7 @@ rules:
475475
unicorn/prefer-array-index-of: [2]
476476
unicorn/prefer-array-some: [2]
477477
unicorn/prefer-at: [0]
478-
unicorn/prefer-code-point: [2]
478+
unicorn/prefer-code-point: [0]
479479
unicorn/prefer-dataset: [2]
480480
unicorn/prefer-date-now: [2]
481481
unicorn/prefer-default-parameters: [0]

.golangci.yml

Lines changed: 6 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.18
32+
go: 1.19
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.18"
78+
lang-version: "1.19"
7979
depguard:
8080
# TODO: use depguard to replace import checks in gitea-vet
8181
list-type: denylist
@@ -171,3 +171,7 @@ issues:
171171
- path: models/user/openid.go
172172
linters:
173173
- golint
174+
- path: models/user/badge.go
175+
linters:
176+
- revive
177+
text: "exported: type name will be used as user.UserBadge by other packages, and that stutters; consider calling this Badge"

.markdownlint.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
commands-show-output: false
2+
fenced-code-language: false
3+
first-line-h1: false
4+
header-increment: false
5+
line-length: {code_blocks: false, tables: false, stern: true, line_length: -1}
6+
no-alt-text: false
7+
no-bare-urls: false
8+
no-blanks-blockquote: false
9+
no-duplicate-header: {allow_different_nesting: true}
10+
no-emphasis-as-header: false
11+
no-empty-links: false
12+
no-hard-tabs: {code_blocks: false}
13+
no-inline-html: false
14+
no-space-in-code: false
15+
no-space-in-emphasis: false
16+
no-trailing-punctuation: false
17+
no-trailing-spaces: {br_spaces: 0}
18+
single-h1: false

0 commit comments

Comments
 (0)