Skip to content

Commit 8b59533

Browse files
committed
Merge remote-tracking branch 'giteaoffical/main'
* giteaoffical/main: (79 commits) Pre-register OAuth application for tea (go-gitea#27509) Fix mermaid flowchart margin issue (go-gitea#27503) add a shortcut to user's profile page to admin user details (go-gitea#27299) Fix actionlint (go-gitea#27513) [skip ci] Updated translations via Crowdin Update JS and PY dependencies (go-gitea#27501) Improve feed icons and feed merge text color (go-gitea#27498) Downgrade `go-co-op/gocron` to v1.31.1 (go-gitea#27511) Enable markdownlint `no-duplicate-header` (go-gitea#27500) bump go-deps (go-gitea#27489) Apply to became a maintainer (go-gitea#27491) change runner for binary [skip ci] Updated translations via Crowdin Remove .exe suffix when cross-compiling on Windows (go-gitea#27448) move re-useable workflow add checkout to disk-clean use hosted runners for nightly actions (go-gitea#27485) Avoid run change title process when the title is same (go-gitea#27467) Fix panic in storageHandler (go-gitea#27446) Rename the default themes to gitea-light, gitea-dark, gitea-auto (go-gitea#27419) ...
2 parents 7bf3179 + a825cc0 commit 8b59533

File tree

340 files changed

+4397
-3607
lines changed

Some content is hidden

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

340 files changed

+4397
-3607
lines changed

.eslintrc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ rules:
476476
prefer-exponentiation-operator: [2]
477477
prefer-named-capture-group: [0]
478478
prefer-numeric-literals: [2]
479-
prefer-object-has-own: [0]
479+
prefer-object-has-own: [2]
480480
prefer-object-spread: [2]
481481
prefer-promise-reject-errors: [2, {allowEmptyReject: false}]
482482
prefer-regex-literals: [2]

.github/actionlint.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ self-hosted-runner:
22
labels:
33
- actuated-4cpu-8gb
44
- actuated-4cpu-16gb
5+
- nscloud

.github/workflows/disk-clean.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: disk-clean
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
triage:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
# FIXME: https://github.com/jlumbroso/free-disk-space/issues/17
12+
- name: same as 'large-packages' but without 'google-cloud-sdk'
13+
shell: bash
14+
run: |
15+
sudo apt-get remove -y '^dotnet-.*'
16+
sudo apt-get remove -y '^llvm-.*'
17+
sudo apt-get remove -y 'php.*'
18+
sudo apt-get remove -y '^mongodb-.*'
19+
sudo apt-get remove -y '^mysql-.*'
20+
sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri
21+
sudo apt-get autoremove -y
22+
sudo apt-get clean
23+
- name: Free Disk Space (Ubuntu)
24+
uses: jlumbroso/free-disk-space@main
25+
with:
26+
# this might remove tools that are actually needed,
27+
# if set to "true" but frees about 6 GB
28+
tool-cache: false
29+
30+
# all of these default to true, but feel free to set to
31+
# "false" if necessary for your workflow
32+
android: true
33+
dotnet: true
34+
haskell: true
35+
large-packages: false
36+
docker-images: false
37+
swap-storage: true

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

Lines changed: 8 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
services:
1919
pgsql:
20-
image: postgres:15
20+
image: postgres:12
2121
env:
2222
POSTGRES_DB: test
2323
POSTGRES_PASSWORD: postgres
@@ -31,10 +31,10 @@ jobs:
3131
minio:
3232
# as github actions doesn't support "entrypoint", we need to use a non-official image
3333
# that has a custom entrypoint set to "minio server /data"
34-
image: bitnami/minio:2021.3.17
34+
image: bitnami/minio:2023.8.31
3535
env:
36-
MINIO_ACCESS_KEY: 123456
37-
MINIO_SECRET_KEY: 12345678
36+
MINIO_ROOT_USER: 123456
37+
MINIO_ROOT_PASSWORD: 12345678
3838
ports:
3939
- "9000:9000"
4040
steps:
@@ -85,13 +85,6 @@ jobs:
8585
needs: files-changed
8686
runs-on: ubuntu-latest
8787
services:
88-
mysql:
89-
image: mysql:5.7
90-
env:
91-
MYSQL_ALLOW_EMPTY_PASSWORD: true
92-
MYSQL_DATABASE: test
93-
ports:
94-
- "3306:3306"
9588
elasticsearch:
9689
image: elasticsearch:7.5.0
9790
env:
@@ -104,13 +97,6 @@ jobs:
10497
MEILI_ENV: development # disable auth
10598
ports:
10699
- "7700:7700"
107-
smtpimap:
108-
image: tabascoterrier/docker-imap-devel:latest
109-
ports:
110-
- "25:25"
111-
- "143:143"
112-
- "587:587"
113-
- "993:993"
114100
redis:
115101
image: redis
116102
options: >- # wait until redis has started
@@ -152,16 +138,16 @@ jobs:
152138
RACE_ENABLED: true
153139
GITHUB_READ_TOKEN: ${{ secrets.GITHUB_READ_TOKEN }}
154140

155-
test-mysql5:
141+
test-mysql:
156142
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
157143
needs: files-changed
158144
runs-on: ubuntu-latest
159145
services:
160146
mysql:
161-
image: mysql:5.7
147+
image: mysql:8.0
162148
env:
163149
MYSQL_ALLOW_EMPTY_PASSWORD: true
164-
MYSQL_DATABASE: test
150+
MYSQL_DATABASE: testgitea
165151
ports:
166152
- "3306:3306"
167153
elasticsearch:
@@ -197,43 +183,13 @@ jobs:
197183
USE_REPO_TEST_DIR: 1
198184
TEST_INDEXER_CODE_ES_URL: "http://elastic:changeme@elasticsearch:9200"
199185

200-
test-mysql8:
201-
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
202-
needs: files-changed
203-
runs-on: ubuntu-latest
204-
services:
205-
mysql8:
206-
image: mysql:8
207-
env:
208-
MYSQL_ALLOW_EMPTY_PASSWORD: true
209-
MYSQL_DATABASE: testgitea
210-
ports:
211-
- "3306:3306"
212-
steps:
213-
- uses: actions/checkout@v4
214-
- uses: actions/setup-go@v4
215-
with:
216-
go-version: "~1.21"
217-
check-latest: true
218-
- name: Add hosts to /etc/hosts
219-
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mysql8" | sudo tee -a /etc/hosts'
220-
- run: make deps-backend
221-
- run: make backend
222-
env:
223-
TAGS: bindata
224-
- run: make test-mysql8-migration test-mysql8
225-
timeout-minutes: 50
226-
env:
227-
TAGS: bindata
228-
USE_REPO_TEST_DIR: 1
229-
230186
test-mssql:
231187
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
232188
needs: files-changed
233189
runs-on: ubuntu-latest
234190
services:
235191
mssql:
236-
image: mcr.microsoft.com/mssql/server:latest
192+
image: mcr.microsoft.com/mssql/server:2017-latest
237193
env:
238194
ACCEPT_EULA: Y
239195
MSSQL_PID: Standard

.github/workflows/release-nightly.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ concurrency:
99
cancel-in-progress: true
1010

1111
jobs:
12+
disk-clean:
13+
uses: ./.github/workflows/disk-clean.yml
1214
nightly-binary:
13-
runs-on: actuated-4cpu-16gb
15+
runs-on: nscloud
1416
steps:
1517
- uses: actions/checkout@v4
1618
# fetch all commits instead of only the last as some branches are long lived and could have many between versions
@@ -56,7 +58,7 @@ jobs:
5658
SOURCE_DIR: dist/release
5759
DEST_DIR: gitea/${{ steps.clean_name.outputs.branch }}
5860
nightly-docker-rootful:
59-
runs-on: actuated-4cpu-16gb
61+
runs-on: ubuntu-latest
6062
steps:
6163
- uses: actions/checkout@v4
6264
# fetch all commits instead of only the last as some branches are long lived and could have many between versions
@@ -93,7 +95,7 @@ jobs:
9395
push: true
9496
tags: gitea/gitea:${{ steps.clean_name.outputs.branch }}
9597
nightly-docker-rootless:
96-
runs-on: actuated-4cpu-16gb
98+
runs-on: ubuntu-latest
9799
steps:
98100
- uses: actions/checkout@v4
99101
# fetch all commits instead of only the last as some branches are long lived and could have many between versions

.markdownlint.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ line-length: {code_blocks: false, tables: false, stern: true, line_length: -1}
66
no-alt-text: false
77
no-bare-urls: false
88
no-blanks-blockquote: false
9-
no-duplicate-header: {allow_different_nesting: true}
109
no-emphasis-as-header: false
1110
no-empty-links: false
1211
no-hard-tabs: {code_blocks: false}

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,33 @@ 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.com).
66

7+
## [1.20.5](https://github.com/go-gitea/gitea/releases/tag/v1.20.5) - 2023-10-03
8+
9+
* ENHANCEMENTS
10+
* Fix z-index on markdown completion (#27237) (#27242 & #27238)
11+
* Use secure cookie for HTTPS sites (#26999) (#27013)
12+
* BUGFIXES
13+
* Fix git 2.11 error when checking IsEmpty (#27393) (#27396)
14+
* Allow get release download files and lfs files with oauth2 token format (#26430) (#27378)
15+
* Fix orphan check for deleted branch (#27310) (#27320)
16+
* Quote table `release` in sql queries (#27205) (#27219)
17+
* Fix release URL in webhooks (#27182) (#27184)
18+
* Fix successful return value for `SyncAndGetUserSpecificDiff` (#27152) (#27156)
19+
* fix pagination for followers and following (#27127) (#27138)
20+
* Fix issue templates when blank isses are disabled (#27061) (#27082)
21+
* Fix context cache bug & enable context cache for dashabord commits' authors(#26991) (#27017)
22+
* Fix INI parsing for value with trailing slash (#26995) (#27001)
23+
* Fix PushEvent NullPointerException jenkinsci/github-plugin (#27203) (#27249)
24+
* Fix organization field being null in POST /orgs/{orgid}/teams (#27150) (#27167 & #27162)
25+
* Fix bug of review request number (#27406) (#27104)
26+
* TESTING
27+
* services/wiki: Close() after error handling (#27129) (#27137)
28+
* DOCS
29+
* Improve actions docs related to `pull_request` event (#27126) (#27145)
30+
* MISC
31+
* Add logs for data broken of comment review (#27326) (#27344)
32+
* Load reviewer before sending notification (#27063) (#27064)
33+
734
## [1.20.4](https://github.com/go-gitea/gitea/releases/tag/v1.20.4) - 2023-09-08
835

936
* SECURITY

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,4 @@ Punit Inani <[email protected]> (@puni9869)
5757
CaiCandong <[email protected]> (@caicandong)
5858
Rui Chen <[email protected]> (@chenrui333)
5959
Nanguan Lin <[email protected]> (@lng2020)
60+
kerwin612 <[email protected]> (@kerwin612)

Makefile

Lines changed: 15 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,14 @@ ifeq ($(HAS_GO), yes)
4949
CGO_CFLAGS ?= $(shell $(GO) env CGO_CFLAGS) $(CGO_EXTRA_CFLAGS)
5050
endif
5151

52-
ifeq ($(OS), Windows_NT)
53-
GOFLAGS := -v -buildmode=exe
54-
EXECUTABLE ?= gitea.exe
55-
else ifeq ($(OS), Windows)
52+
ifeq ($(GOOS),windows)
53+
IS_WINDOWS := yes
54+
else ifeq ($(patsubst Windows%,Windows,$(OS)),Windows)
55+
ifeq ($(GOOS),)
56+
IS_WINDOWS := yes
57+
endif
58+
endif
59+
ifeq ($(IS_WINDOWS),yes)
5660
GOFLAGS := -v -buildmode=exe
5761
EXECUTABLE ?= gitea.exe
5862
else
@@ -167,10 +171,6 @@ TEST_MYSQL_HOST ?= mysql:3306
167171
TEST_MYSQL_DBNAME ?= testgitea
168172
TEST_MYSQL_USERNAME ?= root
169173
TEST_MYSQL_PASSWORD ?=
170-
TEST_MYSQL8_HOST ?= mysql8:3306
171-
TEST_MYSQL8_DBNAME ?= testgitea
172-
TEST_MYSQL8_USERNAME ?= root
173-
TEST_MYSQL8_PASSWORD ?=
174174
TEST_PGSQL_HOST ?= pgsql:5432
175175
TEST_PGSQL_DBNAME ?= testgitea
176176
TEST_PGSQL_USERNAME ?= postgres
@@ -282,12 +282,12 @@ clean:
282282
rm -rf $(EXECUTABLE) $(DIST) $(BINDATA_DEST) $(BINDATA_HASH) \
283283
integrations*.test \
284284
e2e*.test \
285-
tests/integration/gitea-integration-pgsql/ tests/integration/gitea-integration-mysql/ tests/integration/gitea-integration-mysql8/ tests/integration/gitea-integration-sqlite/ \
286-
tests/integration/gitea-integration-mssql/ tests/integration/indexers-mysql/ tests/integration/indexers-mysql8/ tests/integration/indexers-pgsql tests/integration/indexers-sqlite \
287-
tests/integration/indexers-mssql tests/mysql.ini tests/mysql8.ini tests/pgsql.ini tests/mssql.ini man/ \
288-
tests/e2e/gitea-e2e-pgsql/ tests/e2e/gitea-e2e-mysql/ tests/e2e/gitea-e2e-mysql8/ tests/e2e/gitea-e2e-sqlite/ \
289-
tests/e2e/gitea-e2e-mssql/ tests/e2e/indexers-mysql/ tests/e2e/indexers-mysql8/ tests/e2e/indexers-pgsql/ tests/e2e/indexers-sqlite/ \
290-
tests/e2e/indexers-mssql/ tests/e2e/reports/ tests/e2e/test-artifacts/ tests/e2e/test-snapshots/
285+
tests/integration/gitea-integration-* \
286+
tests/integration/indexers-* \
287+
tests/mysql.ini tests/pgsql.ini tests/mssql.ini man/ \
288+
tests/e2e/gitea-e2e-*/ \
289+
tests/e2e/indexers-*/ \
290+
tests/e2e/reports/ tests/e2e/test-artifacts/ tests/e2e/test-snapshots/
291291

292292
.PHONY: fmt
293293
fmt:
@@ -551,27 +551,6 @@ test-mysql\#%: integrations.mysql.test generate-ini-mysql
551551
.PHONY: test-mysql-migration
552552
test-mysql-migration: migrations.mysql.test migrations.individual.mysql.test
553553

554-
generate-ini-mysql8:
555-
sed -e 's|{{TEST_MYSQL8_HOST}}|${TEST_MYSQL8_HOST}|g' \
556-
-e 's|{{TEST_MYSQL8_DBNAME}}|${TEST_MYSQL8_DBNAME}|g' \
557-
-e 's|{{TEST_MYSQL8_USERNAME}}|${TEST_MYSQL8_USERNAME}|g' \
558-
-e 's|{{TEST_MYSQL8_PASSWORD}}|${TEST_MYSQL8_PASSWORD}|g' \
559-
-e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \
560-
-e 's|{{TEST_LOGGER}}|$(or $(TEST_LOGGER),test$(COMMA)file)|g' \
561-
-e 's|{{TEST_TYPE}}|$(or $(TEST_TYPE),integration)|g' \
562-
tests/mysql8.ini.tmpl > tests/mysql8.ini
563-
564-
.PHONY: test-mysql8
565-
test-mysql8: integrations.mysql8.test generate-ini-mysql8
566-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql8.ini ./integrations.mysql8.test
567-
568-
.PHONY: test-mysql8\#%
569-
test-mysql8\#%: integrations.mysql8.test generate-ini-mysql8
570-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql8.ini ./integrations.mysql8.test -test.run $(subst .,/,$*)
571-
572-
.PHONY: test-mysql8-migration
573-
test-mysql8-migration: migrations.mysql8.test migrations.individual.mysql8.test
574-
575554
generate-ini-pgsql:
576555
sed -e 's|{{TEST_PGSQL_HOST}}|${TEST_PGSQL_HOST}|g' \
577556
-e 's|{{TEST_PGSQL_DBNAME}}|${TEST_PGSQL_DBNAME}|g' \
@@ -644,14 +623,6 @@ test-e2e-mysql: playwright e2e.mysql.test generate-ini-mysql
644623
test-e2e-mysql\#%: playwright e2e.mysql.test generate-ini-mysql
645624
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./e2e.mysql.test -test.run TestE2e/$*
646625

647-
.PHONY: test-e2e-mysql8
648-
test-e2e-mysql8: playwright e2e.mysql8.test generate-ini-mysql8
649-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql8.ini ./e2e.mysql8.test
650-
651-
.PHONY: test-e2e-mysql8\#%
652-
test-e2e-mysql8\#%: playwright e2e.mysql8.test generate-ini-mysql8
653-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql8.ini ./e2e.mysql8.test -test.run TestE2e/$*
654-
655626
.PHONY: test-e2e-pgsql
656627
test-e2e-pgsql: playwright e2e.pgsql.test generate-ini-pgsql
657628
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./e2e.pgsql.test
@@ -695,9 +666,6 @@ integration-test-coverage-sqlite: integrations.cover.sqlite.test generate-ini-sq
695666
integrations.mysql.test: git-check $(GO_SOURCES)
696667
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.mysql.test
697668

698-
integrations.mysql8.test: git-check $(GO_SOURCES)
699-
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.mysql8.test
700-
701669
integrations.pgsql.test: git-check $(GO_SOURCES)
702670
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.pgsql.test
703671

@@ -718,11 +686,6 @@ migrations.mysql.test: $(GO_SOURCES) generate-ini-mysql
718686
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.mysql.test
719687
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./migrations.mysql.test
720688

721-
.PHONY: migrations.mysql8.test
722-
migrations.mysql8.test: $(GO_SOURCES) generate-ini-mysql8
723-
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.mysql8.test
724-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql8.ini ./migrations.mysql8.test
725-
726689
.PHONY: migrations.pgsql.test
727690
migrations.pgsql.test: $(GO_SOURCES) generate-ini-pgsql
728691
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.pgsql.test
@@ -744,13 +707,7 @@ migrations.individual.mysql.test: $(GO_SOURCES)
744707
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' $$pkg; \
745708
done
746709

747-
.PHONY: migrations.individual.mysql8.test
748-
migrations.individual.mysql8.test: $(GO_SOURCES)
749-
for pkg in $(shell $(GO) list code.gitea.io/gitea/models/migrations/...); do \
750-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql8.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' $$pkg; \
751-
done
752-
753-
.PHONY: migrations.individual.mysql8.test\#%
710+
.PHONY: migrations.individual.sqlite.test\#%
754711
migrations.individual.sqlite.test\#%: $(GO_SOURCES) generate-ini-sqlite
755712
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$*
756713

@@ -788,9 +745,6 @@ migrations.individual.sqlite.test\#%: $(GO_SOURCES) generate-ini-sqlite
788745
e2e.mysql.test: $(GO_SOURCES)
789746
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.mysql.test
790747

791-
e2e.mysql8.test: $(GO_SOURCES)
792-
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.mysql8.test
793-
794748
e2e.pgsql.test: $(GO_SOURCES)
795749
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.pgsql.test
796750

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Please **DO NOT** file a public issue, instead send your report privately to `se
1212

1313
## Protecting Security Information
1414

15-
Due to the sensitive nature of security information, you can use below GPG public key encrypt your mail body.
15+
Due to the sensitive nature of security information, you can use the below GPG public key to encrypt your mail body.
1616

1717
The PGP key is valid until June 24, 2024.
1818

0 commit comments

Comments
 (0)