Skip to content

Commit 01f13e5

Browse files
authored
Merge branch 'main' into fix-9691-configure-ssl-cipher-suites
2 parents 7cb3835 + 52869ef commit 01f13e5

File tree

837 files changed

+14725
-13442
lines changed

Some content is hidden

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

837 files changed

+14725
-13442
lines changed

.drone.yml

Lines changed: 34 additions & 14 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:
@@ -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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ rules:
368368
unicorn/no-array-push-push: [2]
369369
unicorn/no-console-spaces: [0]
370370
unicorn/no-document-cookie: [2]
371+
unicorn/no-empty-file: [2]
371372
unicorn/no-fn-reference-in-iterator: [0]
372373
unicorn/no-for-loop: [0]
373374
unicorn/no-hex-escape: [0]
@@ -404,6 +405,7 @@ rules:
404405
unicorn/prefer-date-now: [2]
405406
unicorn/prefer-default-parameters: [0]
406407
unicorn/prefer-event-key: [2]
408+
unicorn/prefer-export-from: [2]
407409
unicorn/prefer-includes: [2]
408410
unicorn/prefer-math-trunc: [2]
409411
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: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ 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.6](https://github.com/go-gitea/gitea/releases/tag/v1.15.6) - 2021-10-28
8+
9+
* BUGFIXES
10+
* Prevent panic in serv.go with Deploy Keys (#17434) (#17435)
11+
* Fix CSV render error (#17406) (#17431)
12+
* Read expected buffer size (#17409) (#17430)
13+
* Ensure that restricted users can access repos for which they are members (#17460) (#17464)
14+
* Make commit-statuses popup show correctly (#17447) (#17466)
15+
* TESTING
16+
* Add integration tests for private.NoServCommand and private.ServCommand (#17456) (#17463)
17+
718
## [1.15.5](https://github.com/go-gitea/gitea/releases/tag/v1.15.5) - 2021-10-21
819

920
* SECURITY

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
Alexey Makhov <[email protected]> (@makhov)
2-
Andrey Nering <[email protected]> (@andreynering)
32
Bo-Yi Wu <[email protected]> (@appleboy)
43
Ethan Koenig <[email protected]> (@ethantkoenig)
54
Kees de Vries <[email protected]> (@Bwko)
@@ -45,3 +44,4 @@ Janis Estelmann <[email protected]> (@KN4CK3R)
4544
Steven Kriegler <[email protected]> (@justusbunsi)
4645
Jimmy Praet <[email protected]> (@jpraet)
4746
Leon Hofmeister <[email protected]> (@delvh)
47+
Gusted <[email protected]) (@Gusted)

Makefile

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ COMMA := ,
2727
XGO_VERSION := go-1.17.x
2828
MIN_GO_VERSION := 001016000
2929
MIN_NODE_VERSION := 012017000
30+
MIN_GOLANGCI_LINT_VERSION := 001043000
3031

3132
DOCKER_IMAGE ?= gitea/gitea
3233
DOCKER_TAG ?= latest
@@ -57,8 +58,6 @@ else
5758
SED_INPLACE := sed -i ''
5859
endif
5960

60-
GOFMT ?= gofmt -s
61-
6261
EXTRA_GOFLAGS ?=
6362

6463
MAKE_VERSION := $(shell $(MAKE) -v | head -n 1)
@@ -126,8 +125,6 @@ ifeq ($(filter $(TAGS_SPLIT),bindata),bindata)
126125
GO_SOURCES += $(BINDATA_DEST)
127126
endif
128127

129-
GO_SOURCES_OWN := $(filter-out vendor/% %/bindata.go, $(GO_SOURCES))
130-
131128
#To update swagger use: GO111MODULE=on go get -u github.com/go-swagger/go-swagger/cmd/swagger
132129
SWAGGER := $(GO) run -mod=vendor github.com/go-swagger/go-swagger/cmd/swagger
133130
SWAGGER_SPEC := templates/swagger/v1_json.tmpl
@@ -237,7 +234,7 @@ clean:
237234
.PHONY: fmt
238235
fmt:
239236
@echo "Running go fmt..."
240-
@$(GOFMT) -w $(GO_SOURCES_OWN)
237+
@$(GO) run build/code-batch-process.go gitea-fmt -s -w '{file-list}'
241238

242239
.PHONY: vet
243240
vet:
@@ -297,20 +294,20 @@ misspell-check:
297294
$(GO) install github.com/client9/misspell/cmd/[email protected]; \
298295
fi
299296
@echo "Running misspell-check..."
300-
@misspell -error -i unknwon $(GO_SOURCES_OWN)
297+
@$(GO) run build/code-batch-process.go misspell -error -i unknwon '{file-list}'
301298

302299
.PHONY: misspell
303300
misspell:
304301
@hash misspell > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
305302
$(GO) install github.com/client9/misspell/cmd/[email protected]; \
306303
fi
307304
@echo "Running go misspell..."
308-
@misspell -w -i unknwon $(GO_SOURCES_OWN)
305+
@$(GO) run build/code-batch-process.go misspell -w -i unknwon '{file-list}'
309306

310307
.PHONY: fmt-check
311308
fmt-check:
312309
# get all go files and run go fmt on them
313-
@diff=$$($(GOFMT) -d $(GO_SOURCES_OWN)); \
310+
@diff=$$($(GO) run build/code-batch-process.go gitea-fmt -s -d '{file-list}'); \
314311
if [ -n "$$diff" ]; then \
315312
echo "Please run 'make fmt' and commit the result:"; \
316313
echo "$${diff}"; \
@@ -392,7 +389,7 @@ coverage:
392389
.PHONY: unit-test-coverage
393390
unit-test-coverage:
394391
@echo "Running unit-test-coverage $(GOTESTFLAGS) -tags '$(TEST_TAGS)'..."
395-
@$(GO) test $(GOTESTFLAGS) -mod=vendor -tags='$(TEST_TAGS)' -cover -coverprofile coverage.out $(GO_PACKAGES) && echo "\n==>\033[32m Ok\033[m\n" || exit 1
392+
@$(GO) test $(GOTESTFLAGS) -mod=vendor -timeout=20m -tags='$(TEST_TAGS)' -cover -coverprofile coverage.out $(GO_PACKAGES) && echo "\n==>\033[32m Ok\033[m\n" || exit 1
396393

397394
.PHONY: vendor
398395
vendor:
@@ -765,12 +762,22 @@ pr\#%: clean-all
765762
$(GO) run contrib/pr/checkout.go $*
766763

767764
.PHONY: golangci-lint
768-
golangci-lint:
765+
golangci-lint: golangci-lint-check
766+
golangci-lint run --timeout 10m
767+
768+
.PHONY: golangci-lint-check
769+
golangci-lint-check:
770+
$(eval GOLANGCI_LINT_VERSION := $(shell printf "%03d%03d%03d" $(shell golangci-lint --version | grep -Eo '[0-9]+\.[0-9.]+' | tr '.' ' ');))
771+
$(eval MIN_GOLANGCI_LINT_VER_FMT := $(shell printf "%g.%g.%g" $(shell echo $(MIN_GOLANGCI_LINT_VERSION) | grep -o ...)))
769772
@hash golangci-lint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
773+
echo "Downloading golangci-lint v${MIN_GOLANGCI_LINT_VER_FMT}"; \
774+
export BINARY="golangci-lint"; \
775+
curl -sfL "https://raw.githubusercontent.com/golangci/golangci-lint/v${MIN_GOLANGCI_LINT_VER_FMT}/install.sh" | sh -s -- -b $(GOPATH)/bin v$(MIN_GOLANGCI_LINT_VER_FMT); \
776+
elif [ "$(GOLANGCI_LINT_VERSION)" -lt "$(MIN_GOLANGCI_LINT_VERSION)" ]; then \
777+
echo "Downloading newer version of golangci-lint v${MIN_GOLANGCI_LINT_VER_FMT}"; \
770778
export BINARY="golangci-lint"; \
771-
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(GOPATH)/bin v1.37.0; \
779+
curl -sfL "https://raw.githubusercontent.com/golangci/golangci-lint/v${MIN_GOLANGCI_LINT_VER_FMT}/install.sh" | sh -s -- -b $(GOPATH)/bin v$(MIN_GOLANGCI_LINT_VER_FMT); \
772780
fi
773-
golangci-lint run --timeout 10m
774781

775782
.PHONY: docker
776783
docker:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ or if sqlite support is required:
7474
The `build` target is split into two sub-targets:
7575

7676
- `make backend` which requires [Go 1.16](https://golang.org/dl/) or greater.
77-
- `make frontend` which requires [Node.js 12.17](https://nodejs.org/en/download/) or greater and Internet connectivity to download npm dependencies.
77+
- `make frontend` which requires [Node.js LTS](https://nodejs.org/en/download/) or greater and Internet connectivity to download npm dependencies.
7878

7979
When building from the official source tarballs which include pre-built frontend files, the `frontend` target will not be triggered, making it possible to build without Node.js and Internet connectivity.
8080

0 commit comments

Comments
 (0)