Skip to content

Commit 5afa4e1

Browse files
committed
Merge remote-tracking branch 'origin/main' into password-recovery
2 parents c28a352 + b223d36 commit 5afa4e1

File tree

2,546 files changed

+132808
-101164
lines changed

Some content is hidden

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

2,546 files changed

+132808
-101164
lines changed

.drone.yml

Lines changed: 37 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: compliance
44

55
platform:
66
os: linux
7-
arch: arm64
7+
arch: amd64
88

99
trigger:
1010
event:
@@ -15,19 +15,19 @@ trigger:
1515
steps:
1616
- name: deps-frontend
1717
pull: always
18-
image: node:14
18+
image: node:16
1919
commands:
2020
- make node_modules
2121

2222
- name: lint-frontend
23-
image: node:14
23+
image: node:16
2424
commands:
2525
- make lint-frontend
2626
depends_on: [deps-frontend]
2727

2828
- name: lint-backend
2929
pull: always
30-
image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
30+
image: gitea/test_env:linux-amd64 # 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: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
40+
image: gitea/test_env:linux-amd64 # 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: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
52+
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
5353
commands:
5454
- make lint-backend
5555
environment:
@@ -58,7 +58,7 @@ steps:
5858
TAGS: bindata gogit sqlite sqlite_unlock_notify
5959

6060
- name: checks-frontend
61-
image: node:14
61+
image: node:16
6262
commands:
6363
- make checks-frontend
6464
depends_on: [deps-frontend]
@@ -70,11 +70,17 @@ steps:
7070
- make checks-backend
7171
depends_on: [lint-backend]
7272

73+
- name: test-frontend
74+
image: node:16
75+
commands:
76+
- make test-frontend
77+
depends_on: [lint-frontend]
78+
7379
- name: build-frontend
74-
image: node:14
80+
image: node:16
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
@@ -147,7 +153,7 @@ services:
147153
MYSQL_DATABASE: test
148154

149155
- name: mysql8
150-
image: mysql:8.0
156+
image: mysql:8
151157
environment:
152158
MYSQL_ALLOW_EMPTY_PASSWORD: yes
153159
MYSQL_DATABASE: testgitea
@@ -271,7 +277,7 @@ steps:
271277
- test-mysql
272278
when:
273279
branch:
274-
- master
280+
- main
275281
event:
276282
- push
277283
- pull_request
@@ -288,7 +294,7 @@ steps:
288294
- generate-coverage
289295
when:
290296
branch:
291-
- master
297+
- main
292298
event:
293299
- push
294300
- pull_request
@@ -313,7 +319,7 @@ trigger:
313319
services:
314320
- name: pgsql
315321
pull: default
316-
image: postgres:9.5
322+
image: postgres:10
317323
environment:
318324
POSTGRES_DB: test
319325
POSTGRES_PASSWORD: postgres
@@ -377,7 +383,7 @@ platform:
377383

378384
trigger:
379385
branch:
380-
- master
386+
- main
381387
event:
382388
- cron
383389
cron:
@@ -408,6 +414,7 @@ steps:
408414
settings:
409415
author_email: "[email protected]"
410416
author_name: GiteaBot
417+
branch: main
411418
commit: true
412419
commit_message: "[skip ci] Updated translations via Crowdin"
413420
remote: "[email protected]:go-gitea/gitea.git"
@@ -437,7 +444,7 @@ platform:
437444

438445
trigger:
439446
branch:
440-
- master
447+
- main
441448
event:
442449
- cron
443450
cron:
@@ -455,6 +462,7 @@ steps:
455462
settings:
456463
author_email: "[email protected]"
457464
author_name: GiteaBot
465+
branch: main
458466
commit: true
459467
commit_message: "[skip ci] Updated licenses and gitignores "
460468
remote: "[email protected]:go-gitea/gitea.git"
@@ -476,7 +484,7 @@ workspace:
476484

477485
trigger:
478486
branch:
479-
- master
487+
- main
480488
- "release/*"
481489
event:
482490
- push
@@ -495,7 +503,7 @@ steps:
495503
pull: always
496504
image: techknowlogick/xgo:go-1.16.x
497505
commands:
498-
- curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt -y install nodejs
506+
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
499507
- export PATH=$PATH:$GOPATH/bin
500508
- make release
501509
environment:
@@ -522,7 +530,7 @@ steps:
522530
image: plugins/s3:1
523531
settings:
524532
acl: public-read
525-
bucket: releases
533+
bucket: gitea-artifacts
526534
endpoint: https://storage.gitea.io
527535
path_style: true
528536
source: "dist/release/*"
@@ -539,24 +547,24 @@ steps:
539547
event:
540548
- push
541549

542-
- name: release-master
550+
- name: release-main
543551
image: plugins/s3:1
544552
settings:
545553
acl: public-read
546-
bucket: releases
554+
bucket: gitea-artifacts
547555
endpoint: https://storage.gitea.io
548556
path_style: true
549557
source: "dist/release/*"
550558
strip_prefix: dist/release/
551-
target: /gitea/master
559+
target: /gitea/main
552560
environment:
553561
AWS_ACCESS_KEY_ID:
554562
from_secret: aws_access_key_id
555563
AWS_SECRET_ACCESS_KEY:
556564
from_secret: aws_secret_access_key
557565
when:
558566
branch:
559-
- master
567+
- main
560568
event:
561569
- push
562570

@@ -591,7 +599,7 @@ steps:
591599
pull: always
592600
image: techknowlogick/xgo:go-1.16.x
593601
commands:
594-
- curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt -y install nodejs
602+
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
595603
- export PATH=$PATH:$GOPATH/bin
596604
- make release
597605
environment:
@@ -618,7 +626,7 @@ steps:
618626
image: plugins/s3:1
619627
settings:
620628
acl: public-read
621-
bucket: releases
629+
bucket: gitea-artifacts
622630
endpoint: https://storage.gitea.io
623631
path_style: true
624632
source: "dist/release/*"
@@ -677,7 +685,7 @@ steps:
677685
from_secret: netlify_token
678686
when:
679687
branch:
680-
- master
688+
- main
681689
event:
682690
- push
683691

@@ -695,7 +703,7 @@ depends_on:
695703

696704
trigger:
697705
ref:
698-
- refs/heads/master
706+
- refs/heads/main
699707
- "refs/tags/**"
700708
event:
701709
exclude:
@@ -792,7 +800,7 @@ depends_on:
792800

793801
trigger:
794802
ref:
795-
- refs/heads/master
803+
- refs/heads/main
796804
- "refs/tags/**"
797805
event:
798806
exclude:
@@ -880,7 +888,7 @@ steps:
880888

881889
trigger:
882890
ref:
883-
- refs/heads/master
891+
- refs/heads/main
884892
- "refs/tags/**"
885893
event:
886894
exclude:
@@ -903,7 +911,7 @@ clone:
903911

904912
trigger:
905913
branch:
906-
- master
914+
- main
907915
- "release/*"
908916
event:
909917
- 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: 11 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]
@@ -361,6 +366,7 @@ rules:
361366
unicorn/no-array-instanceof: [0]
362367
unicorn/no-array-push-push: [2]
363368
unicorn/no-console-spaces: [0]
369+
unicorn/no-document-cookie: [2]
364370
unicorn/no-fn-reference-in-iterator: [0]
365371
unicorn/no-for-loop: [0]
366372
unicorn/no-hex-escape: [0]
@@ -384,6 +390,7 @@ rules:
384390
unicorn/numeric-separators-style: [0]
385391
unicorn/prefer-add-event-listener: [2]
386392
unicorn/prefer-array-find: [2]
393+
unicorn/prefer-array-flat-map: [2]
387394
unicorn/prefer-array-flat: [2]
388395
unicorn/prefer-array-index-of: [2]
389396
unicorn/prefer-array-some: [2]
@@ -394,8 +401,10 @@ rules:
394401
unicorn/prefer-includes: [2]
395402
unicorn/prefer-math-trunc: [2]
396403
unicorn/prefer-modern-dom-apis: [0]
404+
unicorn/prefer-module: [2]
397405
unicorn/prefer-negative-index: [2]
398406
unicorn/prefer-node-append: [0]
407+
unicorn/prefer-node-protocol: [0]
399408
unicorn/prefer-node-remove: [0]
400409
unicorn/prefer-number-properties: [0]
401410
unicorn/prefer-optional-catch-binding: [2]
@@ -407,6 +416,7 @@ rules:
407416
unicorn/prefer-spread: [0]
408417
unicorn/prefer-starts-ends-with: [2]
409418
unicorn/prefer-string-slice: [0]
419+
unicorn/prefer-switch: [0]
410420
unicorn/prefer-ternary: [0]
411421
unicorn/prefer-text-content: [2]
412422
unicorn/prefer-trim-start-end: [2]

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Please check the following:
22

3-
1. Make sure you are targeting the `master` branch, pull requests on release branches are only allowed for bug fixes.
3+
1. Make sure you are targeting the `main` branch, pull requests on release branches are only allowed for bug fixes.
44
2. Read contributing guidelines: https://github.com/go-gitea/gitea/blob/master/CONTRIBUTING.md
55
3. Describe what your pull request does and which issue you're targeting (if any)
66

.gitignore

Lines changed: 4 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
@@ -75,11 +76,14 @@ coverage.all
7576
/integrations/mssql.ini
7677
/node_modules
7778
/yarn.lock
79+
/yarn-error.log
80+
/npm-debug.log*
7881
/public/js
7982
/public/serviceworker.js
8083
/public/css
8184
/public/fonts
8285
/public/img/webpack
86+
/web_src/fomantic/node_modules
8387
/web_src/fomantic/build/*
8488
!/web_src/fomantic/build/semantic.js
8589
!/web_src/fomantic/build/semantic.css

.golangci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@ issues:
7070
- path: modules/log/
7171
linters:
7272
- errcheck
73-
- path: routers/routes/web.go
74-
linters:
75-
- dupl
7673
- path: routers/api/v1/repo/issue_subscription.go
7774
linters:
7875
- dupl
@@ -110,3 +107,8 @@ issues:
110107
- text: "exitAfterDefer:"
111108
linters:
112109
- gocritic
110+
- path: modules/graceful/manager_windows.go
111+
linters:
112+
- staticcheck
113+
text: "svc.IsAnInteractiveSession is deprecated: Use IsWindowsService instead."
114+

.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)