Skip to content

Commit 5ae0ac9

Browse files
committed
Merge remote-tracking branch 'origin/main' into smaller-avatar
2 parents 77f50b6 + f58e687 commit 5ae0ac9

File tree

1,391 files changed

+37985
-28607
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,391 files changed

+37985
-28607
lines changed

.air.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +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$"]

.drone.yml

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
kind: pipeline
3+
type: docker
34
name: compliance
45

56
platform:
@@ -130,6 +131,7 @@ steps:
130131

131132
---
132133
kind: pipeline
134+
type: docker
133135
name: testing-amd64
134136

135137
platform:
@@ -191,26 +193,30 @@ steps:
191193
exclude:
192194
- pull_request
193195

194-
- name: build
195-
pull: always
196-
image: golang:1.17
197-
commands:
198-
- make backend
199-
environment:
200-
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
201-
GOSUMDB: sum.golang.org
202-
TAGS: bindata sqlite sqlite_unlock_notify
203-
204196
- name: tag-pre-condition
205197
pull: always
206198
image: drone/git
207199
commands:
208200
- git update-ref refs/heads/tag_test ${DRONE_COMMIT_SHA}
209201

210-
- name: fix-permissions
202+
- name: prepare-test-env
211203
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
212204
commands:
213-
- chown -R gitea:gitea .
205+
- ./build/test-env-prepare.sh
206+
207+
- name: build
208+
pull: always
209+
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
210+
user: gitea
211+
commands:
212+
- ./build/test-env-check.sh
213+
- make backend
214+
environment:
215+
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
216+
GOSUMDB: sum.golang.org
217+
TAGS: bindata sqlite sqlite_unlock_notify
218+
depends_on:
219+
- prepare-test-env
214220

215221
- name: unit-test
216222
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
@@ -353,21 +359,24 @@ steps:
353359
exclude:
354360
- pull_request
355361

356-
- name: fix-permissions
362+
- name: prepare-test-env
357363
image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
358364
commands:
359-
- chown -R gitea:gitea .
365+
- ./build/test-env-prepare.sh
360366

361367
- name: build
362368
pull: always
363369
image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
364370
user: gitea
365371
commands:
372+
- ./build/test-env-check.sh
366373
- make backend
367374
environment:
368375
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
369376
GOSUMDB: sum.golang.org
370377
TAGS: bindata gogit sqlite sqlite_unlock_notify
378+
depends_on:
379+
- prepare-test-env
371380

372381
- name: test-sqlite
373382
image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
@@ -461,6 +470,7 @@ steps:
461470

462471
---
463472
kind: pipeline
473+
type: docker
464474
name: update_gitignore_and_licenses
465475

466476
platform:
@@ -497,6 +507,7 @@ steps:
497507

498508
---
499509
kind: pipeline
510+
type: docker
500511
name: release-latest
501512

502513
platform:
@@ -526,7 +537,7 @@ steps:
526537

527538
- name: static
528539
pull: always
529-
image: techknowlogick/xgo:go-1.16.x
540+
image: techknowlogick/xgo:go-1.17.x
530541
commands:
531542
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
532543
- export PATH=$PATH:$GOPATH/bin
@@ -622,7 +633,7 @@ steps:
622633

623634
- name: static
624635
pull: always
625-
image: techknowlogick/xgo:go-1.16.x
636+
image: techknowlogick/xgo:go-1.17.x
626637
commands:
627638
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
628639
- export PATH=$PATH:$GOPATH/bin
@@ -675,6 +686,7 @@ steps:
675686

676687
---
677688
kind: pipeline
689+
type: docker
678690
name: docs
679691

680692
platform:
@@ -716,6 +728,7 @@ steps:
716728

717729
---
718730
kind: pipeline
731+
type: docker
719732
name: docker-linux-amd64-release-version
720733

721734
platform:
@@ -780,6 +793,7 @@ steps:
780793

781794
---
782795
kind: pipeline
796+
type: docker
783797
name: docker-linux-amd64-release
784798

785799
platform:
@@ -844,6 +858,7 @@ steps:
844858

845859
---
846860
kind: pipeline
861+
type: docker
847862
name: docker-linux-arm64-dry-run
848863

849864
platform:
@@ -876,6 +891,7 @@ steps:
876891

877892
---
878893
kind: pipeline
894+
type: docker
879895
name: docker-linux-arm64-release-version
880896

881897
platform:
@@ -943,6 +959,7 @@ steps:
943959

944960
---
945961
kind: pipeline
962+
type: docker
946963
name: docker-linux-arm64-release
947964

948965
platform:
@@ -1009,6 +1026,7 @@ steps:
10091026
- pull_request
10101027
---
10111028
kind: pipeline
1029+
type: docker
10121030
name: docker-manifest-version
10131031

10141032
platform:
@@ -1052,6 +1070,7 @@ depends_on:
10521070

10531071
---
10541072
kind: pipeline
1073+
type: docker
10551074
name: docker-manifest
10561075

10571076
platform:
@@ -1095,6 +1114,7 @@ depends_on:
10951114

10961115
---
10971116
kind: pipeline
1117+
type: docker
10981118
name: notifications
10991119

11001120
platform:

.eslintrc

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ ignorePatterns:
66

77
parserOptions:
88
sourceType: module
9-
ecmaVersion: 2021
9+
ecmaVersion: latest
1010

1111
plugins:
1212
- eslint-plugin-unicorn
1313
- eslint-plugin-import
1414
- eslint-plugin-vue
1515
- eslint-plugin-html
16+
- eslint-plugin-github
1617

1718
extends:
1819
- plugin:vue/recommended
@@ -96,6 +97,23 @@ rules:
9697
function-paren-newline: [0]
9798
generator-star-spacing: [0]
9899
getter-return: [2]
100+
github/array-foreach: [2]
101+
github/async-currenttarget: [2]
102+
github/async-preventdefault: [2]
103+
github/authenticity-token: [0]
104+
github/get-attribute: [2]
105+
github/js-class-name: [0]
106+
github/no-blur: [0]
107+
github/no-d-none: [0]
108+
github/no-dataset: [2]
109+
github/no-implicit-buggy-globals: [0]
110+
github/no-inner-html: [0]
111+
github/no-innerText: [2]
112+
github/no-then: [0]
113+
github/no-useless-passive: [2]
114+
github/prefer-observers: [0]
115+
github/require-passive-events: [2]
116+
github/unescaped-html-literal: [0]
99117
grouped-accessor-pairs: [2]
100118
guard-for-in: [0]
101119
id-blacklist: [0]
@@ -366,8 +384,10 @@ rules:
366384
unicorn/no-array-instanceof: [0]
367385
unicorn/no-array-method-this-argument: [2]
368386
unicorn/no-array-push-push: [2]
387+
unicorn/no-await-expression-member: [0]
369388
unicorn/no-console-spaces: [0]
370389
unicorn/no-document-cookie: [2]
390+
unicorn/no-empty-file: [2]
371391
unicorn/no-fn-reference-in-iterator: [0]
372392
unicorn/no-for-loop: [0]
373393
unicorn/no-hex-escape: [0]
@@ -400,10 +420,12 @@ rules:
400420
unicorn/prefer-array-index-of: [2]
401421
unicorn/prefer-array-some: [2]
402422
unicorn/prefer-at: [0]
423+
unicorn/prefer-code-point: [2]
403424
unicorn/prefer-dataset: [2]
404425
unicorn/prefer-date-now: [2]
405426
unicorn/prefer-default-parameters: [0]
406427
unicorn/prefer-event-key: [2]
428+
unicorn/prefer-export-from: [2]
407429
unicorn/prefer-includes: [2]
408430
unicorn/prefer-math-trunc: [2]
409431
unicorn/prefer-modern-dom-apis: [0]

.github/pull_request_template.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
<!--
2+
13
Please check the following:
24
35
1. Make sure you are targeting the `main` branch, pull requests on release branches are only allowed for bug fixes.
46
2. Read contributing guidelines: https://github.com/go-gitea/gitea/blob/master/CONTRIBUTING.md
57
3. Describe what your pull request does and which issue you're targeting (if any)
68
7-
**You MUST delete the content above including this line before posting, otherwise your pull request will be invalid.**
9+
-->

.golangci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ linters:
99
- unused
1010
- structcheck
1111
- varcheck
12-
- golint
1312
- dupl
1413
#- gocyclo # The cyclomatic complexety of a lot of functions is too high, we should refactor those another time.
1514
- gofmt
1615
- misspell
1716
- gocritic
17+
- bidichk
18+
- ineffassign
1819
enable-all: false
1920
disable-all: true
2021
fast: false
@@ -111,3 +112,6 @@ issues:
111112
linters:
112113
- staticcheck
113114
text: "svc.IsAnInteractiveSession is deprecated: Use IsWindowsService instead."
115+
- path: models/user/openid.go
116+
linters:
117+
- golint

.revive.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ warningCode = 1
2323
[rule.unexported-return]
2424
[rule.indent-error-flow]
2525
[rule.errorf]
26+
[rule.duplicated-imports]

.stylelintrc

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,31 @@
11
extends: stylelint-config-standard
22

3+
overrides:
4+
- files: ["**/*.less"]
5+
customSyntax: postcss-less
6+
37
rules:
8+
alpha-value-notation: null
49
at-rule-empty-line-before: null
510
block-closing-brace-empty-line-before: null
11+
color-function-notation: null
612
color-hex-length: null
713
comment-empty-line-before: null
14+
declaration-block-no-redundant-longhand-properties: null
815
declaration-block-single-line-max-declarations: null
916
declaration-empty-line-before: null
17+
hue-degree-notation: null
1018
indentation: 2
19+
max-line-length: null
1120
no-descending-specificity: null
21+
no-invalid-position-at-import-rule: null
1222
number-leading-zero: never
23+
number-max-precision: null
24+
property-no-vendor-prefix: null
1325
rule-empty-line-before: null
26+
selector-class-pattern: null
27+
selector-id-pattern: null
1428
selector-pseudo-element-colon-notation: double
1529
shorthand-property-no-redundant-values: true
16-
no-invalid-position-at-import-rule: null
30+
string-quotes: null
31+
value-no-vendor-prefix: null

CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,48 @@ This changelog goes through all the changes that have been made in each release
44
without substantial changes to our git log; to see the highlights of what has
55
been added to each release, please refer to the [blog](https://blog.gitea.io).
66

7+
## [1.15.7](https://github.com/go-gitea/gitea/releases/tag/v1.15.7) - 2021-12-01
8+
9+
* ENHANCEMENTS
10+
* Only allow webhook to send requests to allowed hosts (#17482) (#17510)
11+
* Fix login redirection links (#17451) (#17473)
12+
* BUGFIXES
13+
* Fix database inconsistent when admin change user email (#17549) (#17840)
14+
* Use correct user on releases (#17806) (#17818)
15+
* Fix commit count in tag view (#17698) (#17790)
16+
* Fix close issue but time watcher still running (#17643) (#17761)
17+
* Fix Migrate Description (#17692) (#17727)
18+
* Fix bug when project board get open issue number (#17703) (#17726)
19+
* Return 400 but not 500 when request archive with wrong format (#17691) (#17700)
20+
* Fix bug when read mysql database max lifetime (#17682) (#17690)
21+
* Fix database deadlock when update issue labels (#17649) (#17665)
22+
* Fix bug on detect issue/comment writer (#17592)
23+
* Remove appSubUrl from pasted images (#17572) (#17588)
24+
* Make `ParsePatch` more robust (#17573) (#17580)
25+
* Fix stats upon searching issues (#17566) (#17578)
26+
* Escape issue titles in comments list (#17555) (#17556)
27+
* Fix zero created time bug on commit api (#17546) (#17547)
28+
* Fix database keyword quote problem on migration v161 (#17522) (#17523)
29+
* Fix email with + when active (#17518) (#17520)
30+
* Stop double encoding blame commit messages (#17498) (#17500)
31+
* Quote the table name in CountOrphanedObjects (#17487) (#17488)
32+
* Run Migrate in Install rather than just SyncTables (#17475) (#17486)
33+
* BUILD
34+
* Fix golangci-lint warnings (#17598 et al) (#17668)
35+
* MISC
36+
* Preserve color when inverting emojis (#17797) (#17799)
37+
38+
## [1.15.6](https://github.com/go-gitea/gitea/releases/tag/v1.15.6) - 2021-10-28
39+
40+
* BUGFIXES
41+
* Prevent panic in serv.go with Deploy Keys (#17434) (#17435)
42+
* Fix CSV render error (#17406) (#17431)
43+
* Read expected buffer size (#17409) (#17430)
44+
* Ensure that restricted users can access repos for which they are members (#17460) (#17464)
45+
* Make commit-statuses popup show correctly (#17447) (#17466)
46+
* TESTING
47+
* Add integration tests for private.NoServCommand and private.ServCommand (#17456) (#17463)
48+
749
## [1.15.5](https://github.com/go-gitea/gitea/releases/tag/v1.15.5) - 2021-10-21
850

951
* SECURITY

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,5 @@ CMD ["/bin/s6-svscan", "/etc/s6"]
6666
COPY docker/root /
6767
COPY --from=build-env /go/src/code.gitea.io/gitea/gitea /app/gitea/gitea
6868
COPY --from=build-env /go/src/code.gitea.io/gitea/environment-to-ini /usr/local/bin/environment-to-ini
69-
RUN ln -s /app/gitea/gitea /usr/local/bin/gitea
69+
RUN chmod 755 /usr/bin/entrypoint /app/gitea/gitea /usr/local/bin/gitea /usr/local/bin/environment-to-ini
70+
RUN chmod 755 /etc/s6/gitea/* /etc/s6/openssh/* /etc/s6/.s6-svscan/*

0 commit comments

Comments
 (0)