Skip to content

Commit ccff382

Browse files
committed
Merge branch 'main' into orgdelete
2 parents bacd5b3 + 6c501b1 commit ccff382

File tree

757 files changed

+7956
-8476
lines changed

Some content is hidden

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

757 files changed

+7956
-8476
lines changed

.drone.yml

Lines changed: 0 additions & 428 deletions
This file was deleted.

.eslintrc.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ plugins:
1818
- eslint-plugin-regexp
1919
- eslint-plugin-sonarjs
2020
- eslint-plugin-unicorn
21+
- eslint-plugin-vitest-globals
2122
- eslint-plugin-wc
2223

2324
env:
@@ -45,6 +46,9 @@ overrides:
4546
- files: ["*.config.*"]
4647
rules:
4748
import/no-unused-modules: [0]
49+
- files: ["**/*.test.*", "web_src/js/test/setup.js"]
50+
env:
51+
vitest-globals/env: true
4852
- files: ["web_src/js/modules/fetch.js", "web_src/js/standalone/**/*"]
4953
rules:
5054
no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement, SequenceExpression]
@@ -472,7 +476,7 @@ rules:
472476
prefer-exponentiation-operator: [2]
473477
prefer-named-capture-group: [0]
474478
prefer-numeric-literals: [2]
475-
prefer-object-has-own: [0]
479+
prefer-object-has-own: [2]
476480
prefer-object-spread: [2]
477481
prefer-promise-reject-errors: [2, {allowEmptyReject: false}]
478482
prefer-regex-literals: [2]

.github/ISSUE_TEMPLATE/bug-report.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Bug Report
22
description: Found something you weren't expecting? Report it here!
3-
labels: ["kind/bug"]
3+
labels: ["type/bug"]
44
body:
55
- type: markdown
66
attributes:

.github/ISSUE_TEMPLATE/feature-request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Feature Request
22
description: Got an idea for a feature that Gitea doesn't have currently? Submit your idea here!
3-
labels: ["kind/proposal"]
3+
labels: ["type/proposal"]
44
body:
55
- type: markdown
66
attributes:

.github/ISSUE_TEMPLATE/ui.bug-report.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Web Interface Bug Report
22
description: Something doesn't look quite as it should? Report it here!
3-
labels: ["kind/bug", "kind/ui"]
3+
labels: ["type/bug", "topic/ui"]
44
body:
55
- type: markdown
66
attributes:

.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/labeler.yml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,36 @@
1-
kind/docs:
1+
modifies/docs:
22
- "**/*.md"
33
- "docs/**"
44

5-
kind/ui:
5+
modifies/frontend:
66
- "web_src/**/*"
7+
8+
modifies/templates:
79
- all: ["templates/**", "!templates/swagger/v1_json.tmpl"]
810

9-
kind/api:
10-
- "templates/swagger/v1_json.tmpl"
11+
modifies/api:
1112
- "routers/api/**"
13+
- "templates/swagger/v1_json.tmpl"
14+
15+
modifies/cli:
16+
- "cmd/**"
17+
18+
modifies/translation:
19+
- "options/locale/*.ini"
1220

13-
kind/build:
21+
modifies/migrations:
22+
- "models/migrations/**/*"
23+
24+
modifies/internal:
1425
- "Makefile"
1526
- "Dockerfile"
1627
- "Dockerfile.rootless"
1728
- "docker/**"
1829
- "webpack.config.js"
19-
20-
theme/package-registry:
21-
- "modules/packages/**"
22-
- "services/packages/**"
23-
- "routers/api/packages/**"
24-
- "routers/web/shared/packages/**"
25-
26-
kind/cli:
27-
- "cmd/**"
28-
29-
kind/lint:
3030
- ".eslintrc.yaml"
3131
- ".golangci.yml"
3232
- ".markdownlint.yaml"
3333
- ".spectral.yaml"
3434
- ".stylelintrc.yaml"
3535
- ".yamllint.yaml"
36+
- ".github/**"

.github/workflows/disk-clean.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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 update
16+
sudo apt-get remove -y '^dotnet-.*' || true
17+
sudo apt-get remove -y '^llvm-.*' || true
18+
sudo apt-get remove -y 'php.*' || true
19+
sudo apt-get remove -y '^mongodb-.*' || true
20+
sudo apt-get remove -y '^mysql-.*' || true
21+
sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri || true
22+
sudo apt-get autoremove -y
23+
sudo apt-get clean
24+
env:
25+
DEBIAN_FRONTEND: noninteractive
26+
- name: Free Disk Space (Ubuntu)
27+
uses: jlumbroso/free-disk-space@main
28+
with:
29+
# this might remove tools that are actually needed,
30+
# if set to "true" but frees about 6 GB
31+
tool-cache: false
32+
33+
# all of these default to true, but feel free to set to
34+
# "false" if necessary for your workflow
35+
android: true
36+
dotnet: true
37+
haskell: true
38+
large-packages: false
39+
docker-images: false
40+
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/pull-labeler.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,3 @@ jobs:
1818
- uses: actions/labeler@v4
1919
with:
2020
dot: true
21-
sync-labels: true

.github/workflows/release-nightly.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: release-nightly-assets
1+
name: release-nightly
22

33
on:
44
push:
@@ -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
@@ -46,17 +48,17 @@ jobs:
4648
REF_NAME=$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\///' -e 's/refs\/tags\///' -e 's/release\/v//')
4749
echo "Cleaned name is ${REF_NAME}"
4850
echo "branch=${REF_NAME}" >> "$GITHUB_OUTPUT"
51+
- name: configure aws
52+
uses: aws-actions/configure-aws-credentials@v4
53+
with:
54+
aws-region: ${{ secrets.AWS_REGION }}
55+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
56+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
4957
- name: upload binaries to s3
50-
uses: jakejarvis/s3-sync-action@master
51-
env:
52-
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
53-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
54-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
55-
AWS_REGION: ${{ secrets.AWS_REGION }}
56-
SOURCE_DIR: dist/release
57-
DEST_DIR: gitea/${{ steps.clean_name.outputs.branch }}
58+
run: |
59+
aws s3 sync dist/release s3://${{ secrets.AWS_S3_BUCKET }}/gitea/${{ steps.clean_name.outputs.branch }} --no-progress
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

0 commit comments

Comments
 (0)