Skip to content

Commit 529f515

Browse files
committed
Merge remote-tracking branch 'origin/main' into add-max-concurrent-hashes
2 parents 7f72180 + a2df265 commit 529f515

File tree

1,860 files changed

+101491
-76890
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,860 files changed

+101491
-76890
lines changed

.drone.yml

Lines changed: 31 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ steps:
2727

2828
- name: lint-backend
2929
pull: always
30-
image: golang:1.16
30+
image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
3131
commands:
3232
- make lint-backend
3333
environment:
@@ -37,7 +37,7 @@ steps:
3737

3838
- name: lint-backend-windows
3939
pull: always
40-
image: golang:1.16
40+
image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
4141
commands:
4242
- make golangci-lint vet
4343
environment:
@@ -49,7 +49,7 @@ steps:
4949

5050
- name: lint-backend-gogit
5151
pull: always
52-
image: golang:1.16
52+
image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
5353
commands:
5454
- make lint-backend
5555
environment:
@@ -70,11 +70,17 @@ steps:
7070
- make checks-backend
7171
depends_on: [lint-backend]
7272

73+
- name: test-frontend
74+
image: node:14
75+
commands:
76+
- make test-frontend
77+
depends_on: [lint-frontend]
78+
7379
- name: build-frontend
7480
image: node:14
7581
commands:
7682
- make frontend
77-
depends_on: [lint-frontend]
83+
depends_on: [test-frontend]
7884

7985
- name: build-backend-no-gcc
8086
pull: always
@@ -168,7 +174,7 @@ services:
168174
image: elasticsearch:7.5.0
169175

170176
- name: minio
171-
image: minio/minio:RELEASE.2021-01-16T02-19-44Z
177+
image: minio/minio:RELEASE.2021-03-12T00-00-47Z
172178
commands:
173179
- minio server /data
174180
environment:
@@ -223,10 +229,8 @@ steps:
223229
from_secret: github_read_token
224230

225231
- name: test-mysql
226-
image: golang:1.16
232+
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
227233
commands:
228-
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
229-
- apt-get install -y git-lfs
230234
- make test-mysql-migration integration-test-coverage
231235
environment:
232236
GOPROXY: off
@@ -238,10 +242,8 @@ steps:
238242
- build
239243

240244
- name: test-mysql8
241-
image: golang:1.16
245+
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
242246
commands:
243-
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
244-
- apt-get install -y git-lfs
245247
- timeout -s ABRT 40m make test-mysql8-migration test-mysql8
246248
environment:
247249
GOPROXY: off
@@ -252,10 +254,8 @@ steps:
252254
- build
253255

254256
- name: test-mssql
255-
image: golang:1.16
257+
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
256258
commands:
257-
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
258-
- apt-get install -y git-lfs
259259
- make test-mssql-migration test-mssql
260260
environment:
261261
GOPROXY: off
@@ -277,7 +277,7 @@ steps:
277277
- test-mysql
278278
when:
279279
branch:
280-
- master
280+
- main
281281
event:
282282
- push
283283
- pull_request
@@ -294,7 +294,7 @@ steps:
294294
- generate-coverage
295295
when:
296296
branch:
297-
- master
297+
- main
298298
event:
299299
- push
300300
- pull_request
@@ -349,10 +349,8 @@ steps:
349349
TAGS: bindata gogit sqlite sqlite_unlock_notify
350350

351351
- name: test-sqlite
352-
image: golang:1.16
352+
image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
353353
commands:
354-
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
355-
- apt-get install -y git-lfs
356354
- timeout -s ABRT 40m make test-sqlite-migration test-sqlite
357355
environment:
358356
GOPROXY: off
@@ -363,10 +361,8 @@ steps:
363361
- build
364362

365363
- name: test-pgsql
366-
image: golang:1.16
364+
image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
367365
commands:
368-
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
369-
- apt-get install -y git-lfs
370366
- timeout -s ABRT 40m make test-pgsql-migration test-pgsql
371367
environment:
372368
GOPROXY: off
@@ -387,7 +383,7 @@ platform:
387383

388384
trigger:
389385
branch:
390-
- master
386+
- main
391387
event:
392388
- cron
393389
cron:
@@ -447,7 +443,7 @@ platform:
447443

448444
trigger:
449445
branch:
450-
- master
446+
- main
451447
event:
452448
- cron
453449
cron:
@@ -486,7 +482,7 @@ workspace:
486482

487483
trigger:
488484
branch:
489-
- master
485+
- main
490486
- "release/*"
491487
event:
492488
- push
@@ -505,7 +501,7 @@ steps:
505501
pull: always
506502
image: techknowlogick/xgo:go-1.16.x
507503
commands:
508-
- curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt -y install nodejs
504+
- curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt-get install -y nodejs
509505
- export PATH=$PATH:$GOPATH/bin
510506
- make release
511507
environment:
@@ -549,7 +545,7 @@ steps:
549545
event:
550546
- push
551547

552-
- name: release-master
548+
- name: release-main
553549
image: plugins/s3:1
554550
settings:
555551
acl: public-read
@@ -558,15 +554,15 @@ steps:
558554
path_style: true
559555
source: "dist/release/*"
560556
strip_prefix: dist/release/
561-
target: /gitea/master
557+
target: /gitea/main
562558
environment:
563559
AWS_ACCESS_KEY_ID:
564560
from_secret: aws_access_key_id
565561
AWS_SECRET_ACCESS_KEY:
566562
from_secret: aws_secret_access_key
567563
when:
568564
branch:
569-
- master
565+
- main
570566
event:
571567
- push
572568

@@ -601,7 +597,7 @@ steps:
601597
pull: always
602598
image: techknowlogick/xgo:go-1.16.x
603599
commands:
604-
- curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt -y install nodejs
600+
- curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt-get install -y nodejs
605601
- export PATH=$PATH:$GOPATH/bin
606602
- make release
607603
environment:
@@ -687,7 +683,7 @@ steps:
687683
from_secret: netlify_token
688684
when:
689685
branch:
690-
- master
686+
- main
691687
event:
692688
- push
693689

@@ -705,7 +701,7 @@ depends_on:
705701

706702
trigger:
707703
ref:
708-
- refs/heads/master
704+
- refs/heads/main
709705
- "refs/tags/**"
710706
event:
711707
exclude:
@@ -802,7 +798,7 @@ depends_on:
802798

803799
trigger:
804800
ref:
805-
- refs/heads/master
801+
- refs/heads/main
806802
- "refs/tags/**"
807803
event:
808804
exclude:
@@ -890,7 +886,7 @@ steps:
890886

891887
trigger:
892888
ref:
893-
- refs/heads/master
889+
- refs/heads/main
894890
- "refs/tags/**"
895891
event:
896892
exclude:
@@ -913,7 +909,7 @@ clone:
913909

914910
trigger:
915911
branch:
916-
- master
912+
- main
917913
- "release/*"
918914
event:
919915
- push

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ insert_final_newline = true
1212
[*.{go,tmpl,html}]
1313
indent_style = tab
1414

15+
[templates/custom/*.tmpl]
16+
insert_final_newline = false
17+
18+
[templates/swagger/v1_json.tmpl]
19+
indent_style = space
20+
21+
[templates/user/auth/oidc_wellknown.tmpl]
22+
indent_style = space
23+
1524
[Makefile]
1625
indent_style = tab
1726

.eslintrc

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ root: true
22
reportUnusedDisableDirectives: true
33

44
ignorePatterns:
5-
- /web_src/js/vendor
65
- /templates/base/head.tmpl
76
- /templates/repo/activity.tmpl
87
- /templates/repo/view_file.tmpl
@@ -53,6 +52,12 @@ overrides:
5352
rules:
5453
import/no-unresolved: [0]
5554
import/no-extraneous-dependencies: [0]
55+
- files: ["*.test.js"]
56+
env:
57+
jest: true
58+
- files: ["*.config.js"]
59+
rules:
60+
import/no-unused-modules: [0]
5661

5762
rules:
5863
accessor-pairs: [2]
@@ -344,6 +349,7 @@ rules:
344349
unicode-bom: [2, never]
345350
unicorn/better-regex: [0]
346351
unicorn/catch-error-name: [0]
352+
unicorn/consistent-destructuring: [2]
347353
unicorn/consistent-function-scoping: [2]
348354
unicorn/custom-error-definition: [0]
349355
unicorn/empty-brace-spaces: [2]
@@ -356,19 +362,24 @@ rules:
356362
unicorn/import-style: [0]
357363
unicorn/new-for-builtins: [2]
358364
unicorn/no-abusive-eslint-disable: [0]
365+
unicorn/no-array-for-each: [0]
359366
unicorn/no-array-instanceof: [0]
367+
unicorn/no-array-push-push: [2]
360368
unicorn/no-console-spaces: [0]
361369
unicorn/no-fn-reference-in-iterator: [0]
362370
unicorn/no-for-loop: [0]
363371
unicorn/no-hex-escape: [0]
364372
unicorn/no-keyword-prefix: [0]
365373
unicorn/no-lonely-if: [2]
366374
unicorn/no-nested-ternary: [0]
375+
unicorn/no-new-array: [0]
367376
unicorn/no-new-buffer: [0]
368377
unicorn/no-null: [0]
369378
unicorn/no-object-as-default-parameter: [2]
370379
unicorn/no-process-exit: [0]
371380
unicorn/no-reduce: [2]
381+
unicorn/no-static-only-class: [2]
382+
unicorn/no-this-assignment: [2]
372383
unicorn/no-unreadable-array-destructuring: [0]
373384
unicorn/no-unsafe-regex: [0]
374385
unicorn/no-unused-properties: [2]
@@ -378,8 +389,12 @@ rules:
378389
unicorn/numeric-separators-style: [0]
379390
unicorn/prefer-add-event-listener: [2]
380391
unicorn/prefer-array-find: [2]
392+
unicorn/prefer-array-flat: [2]
393+
unicorn/prefer-array-index-of: [2]
394+
unicorn/prefer-array-some: [2]
381395
unicorn/prefer-dataset: [2]
382396
unicorn/prefer-date-now: [2]
397+
unicorn/prefer-default-parameters: [0]
383398
unicorn/prefer-event-key: [2]
384399
unicorn/prefer-includes: [2]
385400
unicorn/prefer-math-trunc: [2]
@@ -391,11 +406,13 @@ rules:
391406
unicorn/prefer-optional-catch-binding: [2]
392407
unicorn/prefer-query-selector: [0]
393408
unicorn/prefer-reflect-apply: [0]
409+
unicorn/prefer-regexp-test: [2]
394410
unicorn/prefer-replace-all: [0]
395411
unicorn/prefer-set-has: [0]
396412
unicorn/prefer-spread: [0]
397413
unicorn/prefer-starts-ends-with: [2]
398414
unicorn/prefer-string-slice: [0]
415+
unicorn/prefer-switch: [0]
399416
unicorn/prefer-ternary: [0]
400417
unicorn/prefer-text-content: [2]
401418
unicorn/prefer-trim-start-end: [2]

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ _testmain.go
3232

3333
*coverage.out
3434
coverage.all
35+
cpu.out
3536

3637
/modules/options/bindata.go
3738
/modules/options/bindata.go.hash
@@ -80,6 +81,7 @@ coverage.all
8081
/public/css
8182
/public/fonts
8283
/public/img/webpack
84+
/web_src/fomantic/node_modules
8385
/web_src/fomantic/build/*
8486
!/web_src/fomantic/build/semantic.js
8587
!/web_src/fomantic/build/semantic.css

.golangci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,7 @@ issues:
110110
- text: "exitAfterDefer:"
111111
linters:
112112
- gocritic
113+
- path: modules/graceful/manager_windows.go
114+
linters:
115+
- staticcheck
116+
text: "svc.IsAnInteractiveSession is deprecated: Use IsWindowsService instead."

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
audit=false
22
fund=false
3+
update-notifier=false
34
package-lock=true
45
save-exact=true

0 commit comments

Comments
 (0)