Skip to content

Commit af3bcdb

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/audit-logging
Renumbered the audit event migration to 353 to avoid colliding with the new deploy_key token migration (352), moved CLI/AuthenticationSource system user IDs to -4/-5 (deploy-key now owns -3), adapted DeleteDeployKey, the post-receive visibility audit, and audit pagination/test helpers to the refactored APIs on main.
2 parents d02005d + 3c0bfe9 commit af3bcdb

416 files changed

Lines changed: 6139 additions & 3564 deletions

File tree

Some content is hidden

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

.github/actions/docker-dryrun/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ runs:
1212
- uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0
1313
with:
1414
cache-image: false
15-
- uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
15+
- uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
1616
- name: Build regular image
1717
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
1818
with:

.github/actions/python-setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Set up uv and python and restore the uv cache
44
runs:
55
using: composite
66
steps:
7-
- uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
7+
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
88
with:
99
python-version: 3.14
1010
save-cache: ${{ github.workflow == 'cache-seeder' }}

.github/workflows/cache-seeder.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- uses: ./.github/actions/go-setup
3838
- run: make deps-backend deps-tools
3939
- run: TAGS="bindata" make backend
40-
- run: TAGS="bindata gogit" GOEXPERIMENT="" make backend
40+
- run: TAGS="bindata gogit" make backend
4141
- name: warm test compile cache (bindata)
4242
env:
4343
TAGS: bindata
@@ -46,13 +46,12 @@ jobs:
4646
- name: warm test compile cache (bindata gogit)
4747
env:
4848
TAGS: bindata gogit
49-
GOEXPERIMENT:
5049
GOTEST_FLAGS: -race -list=^$$ -count=1
5150
run: make test-backend
5251
- name: warm integration compile cache
5352
run: |
5453
TAGS="bindata" make test-integration-compile
55-
TAGS="bindata gogit" GOEXPERIMENT="" make test-integration-compile
54+
TAGS="bindata gogit" make test-integration-compile
5655
TAGS="bindata gogit" GOTEST_FLAGS="-race" make test-integration-compile
5756
5857
lint:

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ jobs:
9696
- run: make backend
9797
env:
9898
TAGS: bindata gogit
99-
GOEXPERIMENT:
10099
- run: GITEA_TEST_DATABASE=sqlite make test-migration
101100
env:
102101
TAGS: bindata gogit
@@ -107,7 +106,6 @@ jobs:
107106
# sqlite driver can contain large amount of Golang code, so don't use race detector for it, otherwise, extremely slow
108107
GOTEST_FLAGS: -timeout=40m
109108
TAGS: bindata gogit
110-
GOEXPERIMENT:
111109

112110
test-unit:
113111
if: needs.files-changed.outputs.backend == 'true'
@@ -131,7 +129,7 @@ jobs:
131129
ports:
132130
- "7700:7700"
133131
redis:
134-
image: redis:latest@sha256:52334768d4a6594d8969f51a1a6fee3ffa7545f6359a4877229cdc754d2def82
132+
image: redis:latest@sha256:1c4405ec7fb6ed58b6b83d26c7e3fc80625d2aca6cfa517ae03b6e963510f7ca
135133
options: >- # wait until redis has started
136134
--health-cmd "redis-cli ping"
137135
--health-interval 5s
@@ -170,7 +168,6 @@ jobs:
170168
env:
171169
GOTEST_FLAGS: -race -timeout=20m
172170
TAGS: bindata gogit
173-
GOEXPERIMENT:
174171
GITHUB_READ_TOKEN: ${{ secrets.GITHUB_READ_TOKEN }}
175172
GITEA_TEST_CI_SKIP_EXTERNAL: true
176173
- run: make test-check

.github/workflows/release-nightly-snapcraft.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,15 @@ jobs:
2525
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
2626
with:
2727
fetch-depth: 0
28-
- uses: snapcore/action-build@3bdaa03e1ba6bf59a65f84a751d943d549a54e79 # v1.3.0
28+
- name: Build snap
2929
id: build
30+
env:
31+
SNAPCRAFT_IMAGE_INFO: '{"build_url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}'
32+
run: |
33+
# snapcraft installs build-snaps and apt packages system-wide, which needs root
34+
sudo snap install --classic snapcraft
35+
sudo SNAPCRAFT_BUILD_INFO=1 SNAPCRAFT_IMAGE_INFO="$SNAPCRAFT_IMAGE_INFO" snapcraft pack --destructive-mode
36+
echo "snap=$(ls ./*.snap)" >> "$GITHUB_OUTPUT"
3037
# retry snapcraft uploads which can be flaky
3138
- name: Publish snap
3239
run: |

.github/workflows/release-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
- uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0
8080
with:
8181
cache-image: false
82-
- uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
82+
- uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
8383
- name: Get cleaned branch name
8484
id: clean_name
8585
env:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
run: |
6868
aws s3 sync dist/release "s3://$CLOUDFLARE_R2_BUCKET/gitea/$BRANCH" --endpoint-url "https://$CLOUDFLARE_R2_ACCOUNT_ID.r2.cloudflarestorage.com" --no-progress
6969
- name: Install GH CLI
70-
uses: dev-hanz-ops/install-gh-cli-action@af38ce09b1ec248aeb08eea2b16bbecea9e059f8 # v0.2.1
70+
uses: dev-hanz-ops/install-gh-cli-action@6089bdde54118ad7ca3d22053eb2d69387fd2779 # v0.3.0
7171
with:
7272
gh-cli-version: 2.39.1
7373
- name: create github release
@@ -90,7 +90,7 @@ jobs:
9090
- uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0
9191
with:
9292
cache-image: false
93-
- uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
93+
- uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
9494
- uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
9595
id: meta
9696
with:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
run: |
7171
aws s3 sync dist/release "s3://$CLOUDFLARE_R2_BUCKET/gitea/$BRANCH" --endpoint-url "https://$CLOUDFLARE_R2_ACCOUNT_ID.r2.cloudflarestorage.com" --no-progress
7272
- name: Install GH CLI
73-
uses: dev-hanz-ops/install-gh-cli-action@af38ce09b1ec248aeb08eea2b16bbecea9e059f8 # v0.2.1
73+
uses: dev-hanz-ops/install-gh-cli-action@6089bdde54118ad7ca3d22053eb2d69387fd2779 # v0.3.0
7474
with:
7575
gh-cli-version: 2.39.1
7676
- name: create github release
@@ -93,7 +93,7 @@ jobs:
9393
- uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0
9494
with:
9595
cache-image: false
96-
- uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
96+
- uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
9797
- uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
9898
id: meta
9999
with:

.golangci.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ linters:
6262
desc: "migrations must not depend on the models package. HINT: MIGRATION-STRUCT-FROZEN"
6363
- pkg: gitea.dev/modules/structs
6464
desc: "migrations must not depend on modules/structs. HINT: MIGRATION-STRUCT-FROZEN"
65+
modernize:
66+
disable:
67+
- embedlit
6568
nolintlint:
6669
allow-unused: false
6770
require-explanation: true
@@ -143,9 +146,6 @@ linters:
143146
- linters:
144147
- dupl
145148
path: modelmigration/v
146-
- linters:
147-
- forbidigo
148-
path: cmd
149149
- linters:
150150
- dupl
151151
text: (?i)webhook
@@ -162,10 +162,10 @@ linters:
162162
- gocritic
163163
text: '(?i)exitAfterDefer:'
164164
paths:
165-
- node_modules
166-
- .venv
167-
- public
168-
- web_src
165+
- ^node_modules/
166+
- ^\.venv/
167+
- ^public/
168+
- ^web_src/
169169
issues:
170170
max-issues-per-linter: 0
171171
max-same-issues: 0
@@ -182,14 +182,15 @@ formatters:
182182
- blank
183183
- default
184184
gofumpt:
185-
extra-rules: true
185+
extra:
186+
group-params: true
186187
exclusions:
187188
generated: lax
188189
paths:
189-
- node_modules
190-
- .venv
191-
- public
192-
- web_src
190+
- ^node_modules/
191+
- ^\.venv/
192+
- ^public/
193+
- ^web_src/
193194

194195
run:
195196
timeout: 10m

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1
22
# Build frontend on the native platform to avoid QEMU-related issues with nodejs ecosystem
3-
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.26-alpine3.24 AS frontend-build
3+
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.27-alpine3.24 AS frontend-build
44
RUN apk --no-cache add build-base git nodejs pnpm
55
WORKDIR /src
66
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
@@ -9,7 +9,7 @@ COPY --exclude=.git/ . .
99
RUN make frontend
1010

1111
# Build backend for each target platform
12-
FROM docker.io/library/golang:1.26-alpine3.24 AS build-env
12+
FROM docker.io/library/golang:1.27-alpine3.24 AS build-env
1313

1414
ARG GITEA_VERSION
1515
ARG TAGS=""

0 commit comments

Comments
 (0)