Skip to content

Commit 9420313

Browse files
authored
Merge branch 'main' into issues-page-toolbar-layout-adjust
2 parents deca0f9 + 34e5df6 commit 9420313

File tree

1,116 files changed

+18859
-44611
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,116 files changed

+18859
-44611
lines changed

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ insert_final_newline = false
1717

1818
[templates/swagger/v1_json.tmpl]
1919
indent_style = space
20+
insert_final_newline = false
2021

2122
[templates/user/auth/oidc_wellknown.tmpl]
2223
indent_style = space

.eslintrc.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ module.exports = {
336336
'@typescript-eslint/no-unsafe-unary-minus': [2],
337337
'@typescript-eslint/no-unused-expressions': [0],
338338
'@typescript-eslint/no-unused-vars': [2, {vars: 'all', args: 'all', caughtErrors: 'all', ignoreRestSiblings: false, argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_'}],
339-
'@typescript-eslint/no-use-before-define': [0],
339+
'@typescript-eslint/no-use-before-define': [2, {functions: false, classes: true, variables: true, allowNamedExports: true, typedefs: false, enums: false, ignoreTypeReferences: true}],
340340
'@typescript-eslint/no-useless-constructor': [0],
341341
'@typescript-eslint/no-useless-empty-export': [0],
342342
'@typescript-eslint/no-wrapper-object-types': [2],
@@ -693,7 +693,7 @@ module.exports = {
693693
'no-unused-labels': [2],
694694
'no-unused-private-class-members': [2],
695695
'no-unused-vars': [0], // handled by @typescript-eslint/no-unused-vars
696-
'no-use-before-define': [2, {functions: false, classes: true, variables: true, allowNamedExports: true}],
696+
'no-use-before-define': [0], // handled by @typescript-eslint/no-use-before-define
697697
'no-use-extend-native/no-use-extend-native': [2],
698698
'no-useless-backreference': [2],
699699
'no-useless-call': [2],

.github/labeler.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ modifies/internal:
4141
- ".dockerignore"
4242
- "docker/**"
4343
- ".editorconfig"
44-
- ".eslintrc.yaml"
44+
- ".eslintrc.cjs"
4545
- ".golangci.yml"
4646
- ".gitpod.yml"
4747
- ".markdownlint.yaml"
4848
- ".spectral.yaml"
4949
- "stylelint.config.js"
5050
- ".yamllint.yaml"
5151
- ".github/**"
52-
- ".gitea/"
52+
- ".gitea/**"
5353
- ".devcontainer/**"
5454
- "build.go"
5555
- "build/**"
@@ -73,9 +73,9 @@ modifies/go:
7373
modifies/frontend:
7474
- changed-files:
7575
- any-glob-to-any-file:
76-
- "**/*.js"
77-
- "**/*.ts"
78-
- "**/*.vue"
76+
- "*.js"
77+
- "*.ts"
78+
- "web_src/**"
7979

8080
docs-update-needed:
8181
- changed-files:

.github/workflows/cron-licenses.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
with:
1616
go-version-file: go.mod
1717
check-latest: true
18-
- run: make generate-license generate-gitignore
18+
- run: make generate-gitignore
1919
timeout-minutes: 40
2020
- name: push translations to repo
2121
uses: appleboy/[email protected]

.github/workflows/files-changed.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,16 @@ jobs:
5151
- "options/locale/locale_en-US.ini"
5252
5353
frontend:
54-
- "**/*.js"
54+
- "*.js"
55+
- "*.ts"
5556
- "web_src/**"
57+
- "tools/*.js"
58+
- "tools/*.ts"
5659
- "assets/emoji.json"
5760
- "package.json"
5861
- "package-lock.json"
5962
- "Makefile"
60-
- ".eslintrc.yaml"
61-
- "stylelint.config.js"
63+
- ".eslintrc.cjs"
6264
- ".npmrc"
6365
6466
docs:
@@ -85,6 +87,7 @@ jobs:
8587
8688
swagger:
8789
- "templates/swagger/v1_json.tmpl"
90+
- "templates/swagger/v1_input.json"
8891
- "Makefile"
8992
- "package.json"
9093
- "package-lock.json"

.github/workflows/pull-compliance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
go-version-file: go.mod
9696
check-latest: true
9797
- run: make deps-backend deps-tools
98-
- run: make lint-go-windows lint-go-vet
98+
- run: make lint-go-windows lint-go-gitea-vet
9999
env:
100100
TAGS: bindata sqlite sqlite_unlock_notify
101101
GOOS: windows

.github/workflows/pull-db-tests.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,10 @@ jobs:
202202
test-mssql:
203203
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
204204
needs: files-changed
205-
# specifying the version of ubuntu in use as mssql fails on newer kernels
206-
# pending resolution from vendor
207-
runs-on: ubuntu-20.04
205+
runs-on: ubuntu-latest
208206
services:
209207
mssql:
210-
image: mcr.microsoft.com/mssql/server:2017-latest
208+
image: mcr.microsoft.com/mssql/server:2019-latest
211209
env:
212210
ACCEPT_EULA: Y
213211
MSSQL_PID: Standard

.github/workflows/release-tag-version.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ jobs:
8888
# 1.2
8989
# 1.2.3
9090
tags: |
91+
type=semver,pattern={{version}}
9192
type=semver,pattern={{major}}
9293
type=semver,pattern={{major}}.{{minor}}
93-
type=semver,pattern={{version}}
9494
- name: Login to Docker Hub
9595
uses: docker/login-action@v3
9696
with:
@@ -126,9 +126,9 @@ jobs:
126126
# 1.2
127127
# 1.2.3
128128
tags: |
129+
type=semver,pattern={{version}}
129130
type=semver,pattern={{major}}
130131
type=semver,pattern={{major}}.{{minor}}
131-
type=semver,pattern={{version}}
132132
- name: Login to Docker Hub
133133
uses: docker/login-action@v3
134134
with:

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,28 @@ This changelog goes through 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.com).
66

7+
## [1.23.5](https://github.com/go-gitea/gitea/releases/tag/v1.23.5) - 2025-03-04
8+
9+
* SECURITY
10+
* Bump x/oauth2 & x/crypto (#33704) (#33727)
11+
* PERFORMANCE
12+
* Optimize user dashboard loading (#33686) (#33708)
13+
* BUGFIXES
14+
* Fix navbar dropdown item align (#33782)
15+
* Fix inconsistent closed issue list icon (#33722) (#33728)
16+
* Fix for Maven Package Naming Convention Handling (#33678) (#33679)
17+
* Improve Open-with URL encoding (#33666) (#33680)
18+
* Deleting repository should unlink all related packages (#33653) (#33673)
19+
* Fix omitempty bug (#33663) (#33670)
20+
* Upgrade go-crypto from 1.1.4 to 1.1.6 (#33745) (#33754)
21+
* Fix OCI image.version annotation for releases to use full semver (#33698) (#33701)
22+
* Try to fix ACME path when renew (#33668) (#33693)
23+
* Fix mCaptcha bug (#33659) (#33661)
24+
* Git graph: don't show detached commits (#33645) (#33650)
25+
* Use MatchPhraseQuery for bleve code search (#33628)
26+
* Adjust appearence of commit status webhook (#33778) #33789
27+
* Upgrade golang net from 0.35.0 -> 0.36.0 (#33795) #33796
28+
729
## [1.23.4](https://github.com/go-gitea/gitea/releases/tag/v1.23.4) - 2025-02-16
830

931
* SECURITY

Makefile

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ EXTRA_GOFLAGS ?=
7373
MAKE_VERSION := $(shell "$(MAKE)" -v | cat | head -n 1)
7474
MAKE_EVIDENCE_DIR := .make_evidence
7575

76+
GOTESTFLAGS ?=
7677
ifeq ($(RACE_ENABLED),true)
7778
GOFLAGS += -race
7879
GOTESTFLAGS += -race
@@ -165,10 +166,8 @@ ifdef DEPS_PLAYWRIGHT
165166
endif
166167

167168
SWAGGER_SPEC := templates/swagger/v1_json.tmpl
168-
SWAGGER_SPEC_S_TMPL := s|"basePath": *"/api/v1"|"basePath": "{{AppSubUrl \| JSEscape}}/api/v1"|g
169-
SWAGGER_SPEC_S_JSON := s|"basePath": *"{{AppSubUrl \| JSEscape}}/api/v1"|"basePath": "/api/v1"|g
169+
SWAGGER_SPEC_INPUT := templates/swagger/v1_input.json
170170
SWAGGER_EXCLUDE := code.gitea.io/sdk
171-
SWAGGER_NEWLINE_COMMAND := -e '$$a\'
172171

173172
TEST_MYSQL_HOST ?= mysql:3306
174173
TEST_MYSQL_DBNAME ?= testgitea
@@ -271,10 +270,8 @@ endif
271270
.PHONY: generate-swagger
272271
generate-swagger: $(SWAGGER_SPEC) ## generate the swagger spec from code comments
273272

274-
$(SWAGGER_SPEC): $(GO_SOURCES_NO_BINDATA)
275-
$(GO) run $(SWAGGER_PACKAGE) generate spec -x "$(SWAGGER_EXCLUDE)" -o './$(SWAGGER_SPEC)'
276-
$(SED_INPLACE) '$(SWAGGER_SPEC_S_TMPL)' './$(SWAGGER_SPEC)'
277-
$(SED_INPLACE) $(SWAGGER_NEWLINE_COMMAND) './$(SWAGGER_SPEC)'
273+
$(SWAGGER_SPEC): $(GO_SOURCES_NO_BINDATA) $(SWAGGER_SPEC_INPUT)
274+
$(GO) run $(SWAGGER_PACKAGE) generate spec --exclude "$(SWAGGER_EXCLUDE)" --input "$(SWAGGER_SPEC_INPUT)" --output './$(SWAGGER_SPEC)'
278275

279276
.PHONY: swagger-check
280277
swagger-check: generate-swagger
@@ -287,9 +284,11 @@ swagger-check: generate-swagger
287284

288285
.PHONY: swagger-validate
289286
swagger-validate: ## check if the swagger spec is valid
290-
$(SED_INPLACE) '$(SWAGGER_SPEC_S_JSON)' './$(SWAGGER_SPEC)'
287+
@# swagger "validate" requires that the "basePath" must start with a slash, but we are using Golang template "{{...}}"
288+
@$(SED_INPLACE) -E -e 's|"basePath":( *)"(.*)"|"basePath":\1"/\2"|g' './$(SWAGGER_SPEC)' # add a prefix slash to basePath
289+
@# FIXME: there are some warnings
291290
$(GO) run $(SWAGGER_PACKAGE) validate './$(SWAGGER_SPEC)'
292-
$(SED_INPLACE) '$(SWAGGER_SPEC_S_TMPL)' './$(SWAGGER_SPEC)'
291+
@$(SED_INPLACE) -E -e 's|"basePath":( *)"/(.*)"|"basePath":\1"\2"|g' './$(SWAGGER_SPEC)' # remove the prefix slash from basePath
293292

294293
.PHONY: checks
295294
checks: checks-frontend checks-backend ## run various consistency checks
@@ -313,10 +312,10 @@ lint-frontend: lint-js lint-css ## lint frontend files
313312
lint-frontend-fix: lint-js-fix lint-css-fix ## lint frontend files and fix issues
314313

315314
.PHONY: lint-backend
316-
lint-backend: lint-go lint-go-vet lint-go-gopls lint-editorconfig ## lint backend files
315+
lint-backend: lint-go lint-go-gitea-vet lint-go-gopls lint-editorconfig ## lint backend files
317316

318317
.PHONY: lint-backend-fix
319-
lint-backend-fix: lint-go-fix lint-go-vet lint-editorconfig ## lint backend files and fix issues
318+
lint-backend-fix: lint-go-fix lint-go-gitea-vet lint-editorconfig ## lint backend files and fix issues
320319

321320
.PHONY: lint-js
322321
lint-js: node_modules ## lint js files
@@ -367,9 +366,9 @@ lint-go-windows:
367366
@GOOS= GOARCH= $(GO) install $(GOLANGCI_LINT_PACKAGE)
368367
golangci-lint run
369368

370-
.PHONY: lint-go-vet
371-
lint-go-vet: ## lint go files with vet
372-
@echo "Running go vet..."
369+
.PHONY: lint-go-gitea-vet
370+
lint-go-gitea-vet: ## lint go files with gitea-vet
371+
@echo "Running gitea-vet..."
373372
@GOOS= GOARCH= $(GO) build code.gitea.io/gitea-vet
374373
@$(GO) vet -vettool=gitea-vet ./...
375374

@@ -380,6 +379,7 @@ lint-go-gopls: ## lint go files with gopls
380379

381380
.PHONY: lint-editorconfig
382381
lint-editorconfig:
382+
@echo "Running editorconfig check..."
383383
@$(GO) run $(EDITORCONFIG_CHECKER_PACKAGE) $(EDITORCONFIG_FILES)
384384

385385
.PHONY: lint-actions
@@ -471,7 +471,9 @@ tidy-check: tidy
471471
go-licenses: $(GO_LICENSE_FILE) ## regenerate go licenses
472472

473473
$(GO_LICENSE_FILE): go.mod go.sum
474-
-$(GO) run $(GO_LICENSES_PACKAGE) save . --force --save_path=$(GO_LICENSE_TMP_DIR) 2>/dev/null
474+
@rm -rf $(GO_LICENSE_FILE)
475+
$(GO) install $(GO_LICENSES_PACKAGE)
476+
-GOOS=linux CGO_ENABLED=1 go-licenses save . --force --save_path=$(GO_LICENSE_TMP_DIR) 2>/dev/null
475477
$(GO) run build/generate-go-licenses.go $(GO_LICENSE_TMP_DIR) $(GO_LICENSE_FILE)
476478
@rm -rf $(GO_LICENSE_TMP_DIR)
477479

@@ -904,10 +906,6 @@ update-translations:
904906
mv ./translations/*.ini ./options/locale/
905907
rmdir ./translations
906908

907-
.PHONY: generate-license
908-
generate-license: ## update license files
909-
$(GO) run build/generate-licenses.go
910-
911909
.PHONY: generate-gitignore
912910
generate-gitignore: ## update gitignore files
913911
$(GO) run build/generate-gitignores.go

0 commit comments

Comments
 (0)