Skip to content

Commit 88d5608

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: (26 commits) [skip ci] Updated translations via Crowdin Remove and forbid `@ts-expect-error` (go-gitea#36513) Add resolve/unresolve review comment API endpoints (go-gitea#36441) Fix incorrect vendored detections (go-gitea#36508) Bump alpine to 3.23, add platforms to `docker-dryrun` (go-gitea#36379) Unify repo names in system notices (go-gitea#36491) Allow scroll propagation outside code editor (go-gitea#36502) Refactor ActionsTaskID (go-gitea#36503) Update JS deps, remove `knip`, misc tweaks (go-gitea#36499) [skip ci] Updated translations via Crowdin Fix editorconfig not respected in PR Conversation view (go-gitea#36492) Add FOLDER_ICON_THEME configuration option (go-gitea#36496) Don't create self-references in merged PRs (go-gitea#36490) Use reserved .test TLD for unit tests (go-gitea#36498) Fix bug when list pull request commits (go-gitea#36485) Update some go dependencies (go-gitea#36489) chore: add comments for "api/healthz", clean up test env (go-gitea#36481) [SECURITY] Toolchain Update to Go 1.25.6 (go-gitea#36480) [skip ci] Updated translations via Crowdin Render merged pull request title as such in dashboard feed (go-gitea#36479) ...
2 parents 89ff250 + 288d1f5 commit 88d5608

File tree

143 files changed

+2381
-1511
lines changed

Some content is hidden

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

143 files changed

+2381
-1511
lines changed

.github/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ docs-update-needed:
8484
topic/code-linting:
8585
- changed-files:
8686
- any-glob-to-any-file:
87-
- ".eslintrc.cjs"
8887
- ".golangci.yml"
8988
- ".markdownlint.yaml"
9089
- ".spectral.yaml"
9190
- ".yamllint.yaml"
91+
- "eslint*.config.*"
9292
- "stylelint.config.*"

.github/workflows/files-changed.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ jobs:
8585
- "uv.lock"
8686
8787
docker:
88+
- ".github/workflows/pull-docker-dryrun.yml"
8889
- "Dockerfile"
8990
- "Dockerfile.rootless"
9091
- "docker/**"

.github/workflows/pull-docker-dryrun.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,25 @@ jobs:
1414
contents: read
1515

1616
container:
17-
if: needs.files-changed.outputs.docker == 'true' || needs.files-changed.outputs.actions == 'true'
17+
if: needs.files-changed.outputs.docker == 'true'
1818
needs: files-changed
1919
runs-on: ubuntu-latest
2020
permissions:
2121
contents: read
2222
steps:
2323
- uses: actions/checkout@v6
24+
- uses: docker/setup-qemu-action@v3
2425
- uses: docker/setup-buildx-action@v3
2526
- name: Build regular container image
2627
uses: docker/build-push-action@v6
2728
with:
2829
context: .
30+
platforms: linux/amd64,linux/arm64,linux/riscv64
2931
push: false
30-
tags: gitea/gitea:linux-amd64
3132
- name: Build rootless container image
3233
uses: docker/build-push-action@v6
3334
with:
3435
context: .
3536
push: false
37+
platforms: linux/amd64,linux/arm64,linux/riscv64
3638
file: Dockerfile.rootless
37-
tags: gitea/gitea:linux-amd64

AGENTS.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Instructions for agents
2+
3+
- Use `make help` to find available development targets
4+
- Use the latest Golang stable release when working on Go code
5+
- Use the latest Node.js LTS release when working on TypeScript code
6+
- Before committing `.go` changes, run `make fmt` to format, and run `make lint-go` to lint
7+
- Before committing `.ts` changes, run `make lint-js` to lint
8+
- Before committing `go.mod` changes, run `make tidy`
9+
- Before committing new `.go` files, add the current year into the copyright header
10+
- Before committing any files, remove all trailing whitespace from source code lines

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1
22
# Build stage
3-
FROM docker.io/library/golang:1.25-alpine3.22 AS build-env
3+
FROM docker.io/library/golang:1.25-alpine3.23 AS build-env
44

55
ARG GOPROXY=direct
66

@@ -39,7 +39,7 @@ RUN chmod 755 /tmp/local/usr/bin/entrypoint \
3939
/tmp/local/etc/s6/.s6-svscan/* \
4040
/go/src/code.gitea.io/gitea/gitea
4141

42-
FROM docker.io/library/alpine:3.22 AS gitea
42+
FROM docker.io/library/alpine:3.23 AS gitea
4343

4444
EXPOSE 22 3000
4545

@@ -76,5 +76,6 @@ ENV GITEA_CUSTOM=/data/gitea
7676

7777
VOLUME ["/data"]
7878

79+
# HINT: HEALTH-CHECK-ENDPOINT: don't use HEALTHCHECK, search this hint keyword for more information
7980
ENTRYPOINT ["/usr/bin/entrypoint"]
8081
CMD ["/usr/bin/s6-svscan", "/etc/s6"]

Dockerfile.rootless

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1
22
# Build stage
3-
FROM docker.io/library/golang:1.25-alpine3.22 AS build-env
3+
FROM docker.io/library/golang:1.25-alpine3.23 AS build-env
44

55
ARG GOPROXY=direct
66

@@ -33,7 +33,7 @@ COPY docker/rootless /tmp/local
3333
RUN chmod 755 /tmp/local/usr/local/bin/* \
3434
/go/src/code.gitea.io/gitea/gitea
3535

36-
FROM docker.io/library/alpine:3.22 AS gitea-rootless
36+
FROM docker.io/library/alpine:3.23 AS gitea-rootless
3737

3838
EXPOSE 2222 3000
3939

@@ -77,5 +77,6 @@ ENV HOME="/var/lib/gitea/git"
7777
VOLUME ["/var/lib/gitea", "/etc/gitea"]
7878
WORKDIR /var/lib/gitea
7979

80+
# HINT: HEALTH-CHECK-ENDPOINT: don't use HEALTHCHECK, search this hint keyword for more information
8081
ENTRYPOINT ["/usr/bin/dumb-init", "--", "/usr/local/bin/docker-entrypoint.sh"]
8182
CMD []

Makefile

Lines changed: 37 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -314,16 +314,14 @@ lint-backend: lint-go lint-go-gitea-vet lint-editorconfig ## lint backend files
314314
lint-backend-fix: lint-go-fix lint-go-gitea-vet lint-editorconfig ## lint backend files and fix issues
315315

316316
.PHONY: lint-js
317-
lint-js: node_modules ## lint js files
317+
lint-js: node_modules ## lint js and ts files
318318
$(NODE_VARS) pnpm exec eslint --color --max-warnings=0 $(ESLINT_FILES)
319319
$(NODE_VARS) pnpm exec vue-tsc
320-
$(NODE_VARS) pnpm exec knip --no-progress --cache
321320

322321
.PHONY: lint-js-fix
323-
lint-js-fix: node_modules ## lint js files and fix issues
322+
lint-js-fix: node_modules ## lint js and ts files and fix issues
324323
$(NODE_VARS) pnpm exec eslint --color --max-warnings=0 $(ESLINT_FILES) --fix
325324
$(NODE_VARS) pnpm exec vue-tsc
326-
$(NODE_VARS) pnpm exec knip --no-progress --cache --fix
327325

328326
.PHONY: lint-css
329327
lint-css: node_modules ## lint css files
@@ -489,11 +487,11 @@ generate-ini-sqlite:
489487

490488
.PHONY: test-sqlite
491489
test-sqlite: integrations.sqlite.test generate-ini-sqlite
492-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./integrations.sqlite.test
490+
GITEA_TEST_CONF=tests/sqlite.ini ./integrations.sqlite.test
493491

494492
.PHONY: test-sqlite\#%
495493
test-sqlite\#%: integrations.sqlite.test generate-ini-sqlite
496-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./integrations.sqlite.test -test.run $(subst .,/,$*)
494+
GITEA_TEST_CONF=tests/sqlite.ini ./integrations.sqlite.test -test.run $(subst .,/,$*)
497495

498496
.PHONY: test-sqlite-migration
499497
test-sqlite-migration: migrations.sqlite.test migrations.individual.sqlite.test
@@ -510,11 +508,11 @@ generate-ini-mysql:
510508

511509
.PHONY: test-mysql
512510
test-mysql: integrations.mysql.test generate-ini-mysql
513-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./integrations.mysql.test
511+
GITEA_TEST_CONF=tests/mysql.ini ./integrations.mysql.test
514512

515513
.PHONY: test-mysql\#%
516514
test-mysql\#%: integrations.mysql.test generate-ini-mysql
517-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./integrations.mysql.test -test.run $(subst .,/,$*)
515+
GITEA_TEST_CONF=tests/mysql.ini ./integrations.mysql.test -test.run $(subst .,/,$*)
518516

519517
.PHONY: test-mysql-migration
520518
test-mysql-migration: migrations.mysql.test migrations.individual.mysql.test
@@ -533,11 +531,11 @@ generate-ini-pgsql:
533531

534532
.PHONY: test-pgsql
535533
test-pgsql: integrations.pgsql.test generate-ini-pgsql
536-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./integrations.pgsql.test
534+
GITEA_TEST_CONF=tests/pgsql.ini ./integrations.pgsql.test
537535

538536
.PHONY: test-pgsql\#%
539537
test-pgsql\#%: integrations.pgsql.test generate-ini-pgsql
540-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./integrations.pgsql.test -test.run $(subst .,/,$*)
538+
GITEA_TEST_CONF=tests/pgsql.ini ./integrations.pgsql.test -test.run $(subst .,/,$*)
541539

542540
.PHONY: test-pgsql-migration
543541
test-pgsql-migration: migrations.pgsql.test migrations.individual.pgsql.test
@@ -554,11 +552,11 @@ generate-ini-mssql:
554552

555553
.PHONY: test-mssql
556554
test-mssql: integrations.mssql.test generate-ini-mssql
557-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./integrations.mssql.test
555+
GITEA_TEST_CONF=tests/mssql.ini ./integrations.mssql.test
558556

559557
.PHONY: test-mssql\#%
560558
test-mssql\#%: integrations.mssql.test generate-ini-mssql
561-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./integrations.mssql.test -test.run $(subst .,/,$*)
559+
GITEA_TEST_CONF=tests/mssql.ini ./integrations.mssql.test -test.run $(subst .,/,$*)
562560

563561
.PHONY: test-mssql-migration
564562
test-mssql-migration: migrations.mssql.test migrations.individual.mssql.test
@@ -577,59 +575,59 @@ test-e2e: test-e2e-sqlite
577575

578576
.PHONY: test-e2e-sqlite
579577
test-e2e-sqlite: playwright e2e.sqlite.test generate-ini-sqlite
580-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./e2e.sqlite.test
578+
GITEA_TEST_CONF=tests/sqlite.ini ./e2e.sqlite.test
581579

582580
.PHONY: test-e2e-sqlite\#%
583581
test-e2e-sqlite\#%: playwright e2e.sqlite.test generate-ini-sqlite
584-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./e2e.sqlite.test -test.run TestE2e/$*
582+
GITEA_TEST_CONF=tests/sqlite.ini ./e2e.sqlite.test -test.run TestE2e/$*
585583

586584
.PHONY: test-e2e-mysql
587585
test-e2e-mysql: playwright e2e.mysql.test generate-ini-mysql
588-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./e2e.mysql.test
586+
GITEA_TEST_CONF=tests/mysql.ini ./e2e.mysql.test
589587

590588
.PHONY: test-e2e-mysql\#%
591589
test-e2e-mysql\#%: playwright e2e.mysql.test generate-ini-mysql
592-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./e2e.mysql.test -test.run TestE2e/$*
590+
GITEA_TEST_CONF=tests/mysql.ini ./e2e.mysql.test -test.run TestE2e/$*
593591

594592
.PHONY: test-e2e-pgsql
595593
test-e2e-pgsql: playwright e2e.pgsql.test generate-ini-pgsql
596-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./e2e.pgsql.test
594+
GITEA_TEST_CONF=tests/pgsql.ini ./e2e.pgsql.test
597595

598596
.PHONY: test-e2e-pgsql\#%
599597
test-e2e-pgsql\#%: playwright e2e.pgsql.test generate-ini-pgsql
600-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./e2e.pgsql.test -test.run TestE2e/$*
598+
GITEA_TEST_CONF=tests/pgsql.ini ./e2e.pgsql.test -test.run TestE2e/$*
601599

602600
.PHONY: test-e2e-mssql
603601
test-e2e-mssql: playwright e2e.mssql.test generate-ini-mssql
604-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./e2e.mssql.test
602+
GITEA_TEST_CONF=tests/mssql.ini ./e2e.mssql.test
605603

606604
.PHONY: test-e2e-mssql\#%
607605
test-e2e-mssql\#%: playwright e2e.mssql.test generate-ini-mssql
608-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./e2e.mssql.test -test.run TestE2e/$*
606+
GITEA_TEST_CONF=tests/mssql.ini ./e2e.mssql.test -test.run TestE2e/$*
609607

610608
.PHONY: bench-sqlite
611609
bench-sqlite: integrations.sqlite.test generate-ini-sqlite
612-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./integrations.sqlite.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
610+
GITEA_TEST_CONF=tests/sqlite.ini ./integrations.sqlite.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
613611

614612
.PHONY: bench-mysql
615613
bench-mysql: integrations.mysql.test generate-ini-mysql
616-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./integrations.mysql.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
614+
GITEA_TEST_CONF=tests/mysql.ini ./integrations.mysql.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
617615

618616
.PHONY: bench-mssql
619617
bench-mssql: integrations.mssql.test generate-ini-mssql
620-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./integrations.mssql.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
618+
GITEA_TEST_CONF=tests/mssql.ini ./integrations.mssql.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
621619

622620
.PHONY: bench-pgsql
623621
bench-pgsql: integrations.pgsql.test generate-ini-pgsql
624-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./integrations.pgsql.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
622+
GITEA_TEST_CONF=tests/pgsql.ini ./integrations.pgsql.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
625623

626624
.PHONY: integration-test-coverage
627625
integration-test-coverage: integrations.cover.test generate-ini-mysql
628-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./integrations.cover.test -test.coverprofile=integration.coverage.out
626+
GITEA_TEST_CONF=tests/mysql.ini ./integrations.cover.test -test.coverprofile=integration.coverage.out
629627

630628
.PHONY: integration-test-coverage-sqlite
631629
integration-test-coverage-sqlite: integrations.cover.sqlite.test generate-ini-sqlite
632-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./integrations.cover.sqlite.test -test.coverprofile=integration.coverage.out
630+
GITEA_TEST_CONF=tests/sqlite.ini ./integrations.cover.sqlite.test -test.coverprofile=integration.coverage.out
633631

634632
integrations.mysql.test: git-check $(GO_SOURCES)
635633
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.mysql.test
@@ -652,54 +650,54 @@ integrations.cover.sqlite.test: git-check $(GO_SOURCES)
652650
.PHONY: migrations.mysql.test
653651
migrations.mysql.test: $(GO_SOURCES) generate-ini-mysql
654652
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.mysql.test
655-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./migrations.mysql.test
653+
GITEA_TEST_CONF=tests/mysql.ini ./migrations.mysql.test
656654

657655
.PHONY: migrations.pgsql.test
658656
migrations.pgsql.test: $(GO_SOURCES) generate-ini-pgsql
659657
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.pgsql.test
660-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./migrations.pgsql.test
658+
GITEA_TEST_CONF=tests/pgsql.ini ./migrations.pgsql.test
661659

662660
.PHONY: migrations.mssql.test
663661
migrations.mssql.test: $(GO_SOURCES) generate-ini-mssql
664662
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.mssql.test
665-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./migrations.mssql.test
663+
GITEA_TEST_CONF=tests/mssql.ini ./migrations.mssql.test
666664

667665
.PHONY: migrations.sqlite.test
668666
migrations.sqlite.test: $(GO_SOURCES) generate-ini-sqlite
669667
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.sqlite.test -tags '$(TEST_TAGS)'
670-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./migrations.sqlite.test
668+
GITEA_TEST_CONF=tests/sqlite.ini ./migrations.sqlite.test
671669

672670
.PHONY: migrations.individual.mysql.test
673671
migrations.individual.mysql.test: $(GO_SOURCES)
674-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini $(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' -p 1 $(MIGRATE_TEST_PACKAGES)
672+
GITEA_TEST_CONF=tests/mysql.ini $(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' -p 1 $(MIGRATE_TEST_PACKAGES)
675673

676674
.PHONY: migrations.individual.sqlite.test\#%
677675
migrations.individual.sqlite.test\#%: $(GO_SOURCES) generate-ini-sqlite
678-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$*
676+
GITEA_TEST_CONF=tests/sqlite.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$*
679677

680678
.PHONY: migrations.individual.pgsql.test
681679
migrations.individual.pgsql.test: $(GO_SOURCES)
682-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini $(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' -p 1 $(MIGRATE_TEST_PACKAGES)
680+
GITEA_TEST_CONF=tests/pgsql.ini $(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' -p 1 $(MIGRATE_TEST_PACKAGES)
683681

684682
.PHONY: migrations.individual.pgsql.test\#%
685683
migrations.individual.pgsql.test\#%: $(GO_SOURCES) generate-ini-pgsql
686-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$*
684+
GITEA_TEST_CONF=tests/pgsql.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$*
687685

688686
.PHONY: migrations.individual.mssql.test
689687
migrations.individual.mssql.test: $(GO_SOURCES) generate-ini-mssql
690-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini $(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' -p 1 $(MIGRATE_TEST_PACKAGES)
688+
GITEA_TEST_CONF=tests/mssql.ini $(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' -p 1 $(MIGRATE_TEST_PACKAGES)
691689

692690
.PHONY: migrations.individual.mssql.test\#%
693691
migrations.individual.mssql.test\#%: $(GO_SOURCES) generate-ini-mssql
694-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$*
692+
GITEA_TEST_CONF=tests/mssql.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$*
695693

696694
.PHONY: migrations.individual.sqlite.test
697695
migrations.individual.sqlite.test: $(GO_SOURCES) generate-ini-sqlite
698-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' -p 1 $(MIGRATE_TEST_PACKAGES)
696+
GITEA_TEST_CONF=tests/sqlite.ini $(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' -p 1 $(MIGRATE_TEST_PACKAGES)
699697

700698
.PHONY: migrations.individual.sqlite.test\#%
701699
migrations.individual.sqlite.test\#%: $(GO_SOURCES) generate-ini-sqlite
702-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$*
700+
GITEA_TEST_CONF=tests/sqlite.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$*
703701

704702
e2e.mysql.test: $(GO_SOURCES)
705703
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.mysql.test
@@ -747,7 +745,7 @@ security-check:
747745

748746
$(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ)
749747
ifneq ($(and $(STATIC),$(findstring pam,$(TAGS))),)
750-
$(error pam support set via TAGS doesn't support static builds)
748+
$(error pam support set via TAGS does not support static builds)
751749
endif
752750
CGO_ENABLED="$(CGO_ENABLED)" CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(EXTLDFLAGS) $(LDFLAGS)' -o $@
753751

cmd/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ func NewMainApp(appVer AppVersion) *cli.Command {
149149
app.Commands = append(app.Commands, subCmdWithConfig...)
150150
app.Commands = append(app.Commands, subCmdStandalone...)
151151

152-
setting.InitGiteaEnvVars()
152+
setting.UnsetUnnecessaryEnvVars()
153153
return app
154154
}
155155

cmd/main_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ func TestCliCmd(t *testing.T) {
157157

158158
for _, c := range cases {
159159
t.Run(c.cmd, func(t *testing.T) {
160+
defer test.MockVariableValue(&setting.InstallLock, false)()
160161
app := newTestApp(cli.Command{
161162
Action: func(ctx context.Context, cmd *cli.Command) error {
162163
_, _ = fmt.Fprint(cmd.Root().Writer, makePathOutput(setting.AppWorkPath, setting.CustomPath, setting.CustomConf))
@@ -170,7 +171,10 @@ func TestCliCmd(t *testing.T) {
170171
r, err := runTestApp(app, args...)
171172
assert.NoError(t, err, c.cmd)
172173
assert.NotEmpty(t, c.exp, c.cmd)
173-
assert.Contains(t, r.Stdout, c.exp, c.cmd)
174+
if !assert.Contains(t, r.Stdout, c.exp, c.cmd) {
175+
t.Log("Full output:\n" + r.Stdout)
176+
t.Log("Expected:\n" + c.exp)
177+
}
174178
})
175179
}
176180
}

custom/conf/app.example.ini

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1329,9 +1329,12 @@ LEVEL = Info
13291329
;; Leave it empty to allow users to select any theme from "{CustomPath}/public/assets/css/theme-*.css"
13301330
;THEMES =
13311331
;;
1332-
;; The icons for file list (basic/material), this is a temporary option which will be replaced by a user setting in the future.
1332+
;; The icon theme for files (basic/material)
13331333
;FILE_ICON_THEME = material
13341334
;;
1335+
;; The icon theme for folders (basic/material)
1336+
;FOLDER_ICON_THEME = basic
1337+
;;
13351338
;; All available reactions users can choose on issues/prs and comments.
13361339
;; Values can be emoji alias (:smile:) or a unicode emoji.
13371340
;; For custom reactions, add a tightly cropped square image to public/assets/img/emoji/reaction_name.png

0 commit comments

Comments
 (0)