Skip to content

Commit aa4e783

Browse files
authored
Merge branch 'main' into fix-owner-team-accessmode
2 parents 7e3cdaa + f020fc2 commit aa4e783

File tree

243 files changed

+4615
-3777
lines changed

Some content is hidden

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

243 files changed

+4615
-3777
lines changed

.drone.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ steps:
726726

727727
# TODO: We should probably build all dependencies into a test image
728728
- name: test-e2e
729-
image: mcr.microsoft.com/playwright:v1.31.2-focal
729+
image: mcr.microsoft.com/playwright:v1.32.1-focal
730730
commands:
731731
- curl -sLO https://go.dev/dl/go1.20.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.20.linux-amd64.tar.gz
732732
- groupadd --gid 1001 gitea && useradd -m --gid 1001 --uid 1001 gitea

.eslintrc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ rules:
164164
jquery/no-parse-html: [2]
165165
jquery/no-prop: [0]
166166
jquery/no-proxy: [2]
167-
jquery/no-ready: [0]
167+
jquery/no-ready: [2]
168168
jquery/no-serialize: [2]
169169
jquery/no-show: [2]
170170
jquery/no-size: [2]

.gitpod.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ tasks:
2424
make watch-frontend
2525
openMode: split-right
2626
- name: Run docs
27-
before: sudo bash -c "$(grep 'https://github.com/gohugoio/hugo/releases/download' Makefile | tr -d '\')" # install hugo
28-
command: cd docs && make clean update && hugo server -D -F --baseUrl $(gp url 1313) --liveReloadPort=443 --appendPort=false --bind=0.0.0.0
27+
command: |
28+
gp sync-await setup
29+
cd docs
30+
make clean update
31+
hugo server -D -F --baseUrl $(gp url 1313) --liveReloadPort=443 --appendPort=false --bind=0.0.0.0
2932
openMode: split-right
3033

3134
vscode:

.stylelintrc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ rules:
8888
no-invalid-position-at-import-rule: null
8989
no-irregular-whitespace: true
9090
no-unknown-animations: null
91+
no-unknown-custom-properties: null
9192
number-max-precision: null
9293
property-allowed-list: null
9394
property-disallowed-list: null

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Jimmy Praet <[email protected]> (@jpraet)
4444
Leon Hofmeister <[email protected]> (@delvh)
4545
Wim <[email protected]> (@42wim)
4646
Jason Song <[email protected]> (@wolfogre)
47-
Yarden Shoham <hrsi88@gmail.com> (@yardenshoham)
47+
Yarden Shoham <git@yardenshoham.com> (@yardenshoham)
4848
Yu Tian <[email protected]> (@Zettat123)
4949
Eddie Yang <[email protected]> (@yp05327)
5050
Dong Ge <[email protected]> (@sillyguodong)

Makefile

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ TEST_TAGS ?= sqlite sqlite_unlock_notify
131131

132132
TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE) $(FOMANTIC_WORK_DIR)/node_modules $(DIST) $(MAKE_EVIDENCE_DIR) $(AIR_TMP_DIR) $(GO_LICENSE_TMP_DIR)
133133

134-
GO_DIRS := cmd tests models modules routers build services tools
134+
GO_DIRS := build cmd models modules routers services tests
135135
WEB_DIRS := web_src/js web_src/css
136136

137137
GO_SOURCES := $(wildcard *.go)
@@ -189,6 +189,7 @@ help:
189189
@echo " - clean delete backend and integration files"
190190
@echo " - clean-all delete backend, frontend and integration files"
191191
@echo " - deps install dependencies"
192+
@echo " - deps-docs install docs dependencies"
192193
@echo " - deps-frontend install frontend dependencies"
193194
@echo " - deps-backend install backend dependencies"
194195
@echo " - deps-tools install tool dependencies"
@@ -218,7 +219,6 @@ help:
218219
@echo " - tidy run go mod tidy"
219220
@echo " - test[\#TestSpecificName] run unit test"
220221
@echo " - test-sqlite[\#TestSpecificName] run integration test for sqlite"
221-
@echo " - pr#<index> build and start gitea from a PR with integration test data loaded"
222222

223223
.PHONY: go-check
224224
go-check:
@@ -352,7 +352,7 @@ lint-backend: golangci-lint vet editorconfig-checker
352352

353353
.PHONY: watch
354354
watch:
355-
bash tools/watch.sh
355+
bash build/watch.sh
356356

357357
.PHONY: watch-frontend
358358
watch-frontend: node-check node_modules
@@ -816,14 +816,17 @@ release-docs: | $(DIST_DIRS) docs
816816
tar -czf $(DIST)/release/gitea-docs-$(VERSION).tar.gz -C ./docs/public .
817817

818818
.PHONY: docs
819-
docs:
819+
docs: deps-docs
820+
cd docs; make trans-copy clean build-offline;
821+
822+
.PHONY: deps-docs
823+
deps-docs:
820824
@hash hugo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
821-
curl -sL https://github.com/gohugoio/hugo/releases/download/v$(HUGO_VERSION)/hugo_$(HUGO_VERSION)_Linux-64bit.tar.gz | tar zxf - -C /tmp && mv /tmp/hugo /usr/bin/hugo && chmod +x /usr/bin/hugo; \
825+
curl -sL https://github.com/gohugoio/hugo/releases/download/v$(HUGO_VERSION)/hugo_$(HUGO_VERSION)_Linux-64bit.tar.gz | tar zxf - -C /tmp && mkdir -p ~/go/bin && mv /tmp/hugo ~/go/bin/hugo && chmod +x ~/go/bin/hugo; \
822826
fi
823-
cd docs; make trans-copy clean build-offline;
824827

825828
.PHONY: deps
826-
deps: deps-frontend deps-backend deps-tools
829+
deps: deps-frontend deps-backend deps-tools deps-docs
827830

828831
.PHONY: deps-frontend
829832
deps-frontend: node_modules
@@ -935,10 +938,6 @@ generate-manpage:
935938
@gzip -9 man/man1/gitea.1 && echo man/man1/gitea.1.gz created
936939
@#TODO A small script that formats config-cheat-sheet.en-us.md nicely for use as a config man page
937940

938-
.PHONY: pr\#%
939-
pr\#%: clean-all
940-
$(GO) run contrib/pr/checkout.go $*
941-
942941
.PHONY: golangci-lint
943942
golangci-lint:
944943
$(GO) run $(GOLANGCI_LINT_PACKAGE) run

assets/go-licenses.json

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/backport-locales.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright 2023 The Gitea Authors. All rights reserved.
2+
// SPDX-License-Identifier: MIT
3+
14
//go:build ignore
25

36
package main
@@ -74,10 +77,11 @@ func main() {
7477
if secNew.HasKey(keyEnUs.Name()) {
7578
oldStr := secOld.Key(keyEnUs.Name()).String()
7679
newStr := secNew.Key(keyEnUs.Name()).String()
77-
// A bug: many of new translations with ";" are broken in Crowdin (due to last messy restoring)
78-
// As the broken strings are gradually fixed, this workaround check could be removed (in a few months?)
79-
if strings.Contains(oldStr, ";") && !strings.Contains(newStr, ";") {
80-
println("skip potential broken string", path, secEnUS.Name(), keyEnUs.Name())
80+
if oldStr != "" && strings.Count(oldStr, "%") != strings.Count(newStr, "%") {
81+
fmt.Printf("WARNING: locale %s [%s]%s has different number of arguments, skipping\n", path, secEnUS.Name(), keyEnUs.Name())
82+
fmt.Printf("\told: %s\n", oldStr)
83+
fmt.Printf("\tnew: %s\n", newStr)
84+
fmt.Println("---- ")
8185
continue
8286
}
8387
secOld.Key(keyEnUs.Name()).SetValue(newStr)

build/code-batch-process.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ func newFileCollector(fileFilter string, batchSize int) (*fileCollector, error)
6565
"modules",
6666
"routers",
6767
"services",
68-
"tools",
6968
}
7069
co.includePatterns = append(co.includePatterns, regexp.MustCompile(`.*\.go$`))
7170

build/generate-emoji.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ func main() {
6060
// generate data
6161
buf, err := generate()
6262
if err != nil {
63-
log.Fatal(err)
63+
log.Fatalf("generate err: %v", err)
6464
}
6565

6666
// write
6767
err = os.WriteFile(*flagOut, buf, 0o644)
6868
if err != nil {
69-
log.Fatal(err)
69+
log.Fatalf("WriteFile err: %v", err)
7070
}
7171
}
7272

build/test-echo.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Copyright 2023 The Gitea Authors. All rights reserved.
2+
// SPDX-License-Identifier: MIT
3+
4+
//go:build ignore
5+
6+
package main
7+
8+
import (
9+
"fmt"
10+
"io"
11+
"os"
12+
)
13+
14+
func main() {
15+
_, err := io.Copy(os.Stdout, os.Stdin)
16+
if err != nil {
17+
fmt.Fprintf(os.Stderr, "Error: %v", err)
18+
os.Exit(1)
19+
}
20+
}

build/update-locales.sh

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,10 @@ fi
1717

1818
mv ./options/locale/locale_en-US.ini ./options/
1919

20-
# the "ini" library for locale has many quirks
21-
# * `a="xx"` gets `xx` (no quote)
22-
# * `a=x\"y` gets `x\"y` (no unescaping)
23-
# * `a="x\"y"` gets `"x\"y"` (no unescaping, the quotes are still there)
24-
# * `a='x\"y'` gets `x\"y` (no unescaping, no quote)
25-
# * `a="foo` gets `"foo` (although the quote is not closed)
26-
# * 'a=`foo`' works like single-quote
27-
# crowdin needs the strings to be quoted correctly and doesn't like incomplete quotes
28-
# crowdin always outputs quoted strings if there are quotes in the strings.
29-
30-
# this script helps to unquote the crowdin outputs for the quirky ini library
20+
# the "ini" library for locale has many quirks, its behavior is different from Crowdin.
21+
# see i18n_test.go for more details
22+
23+
# this script helps to unquote the Crowdin outputs for the quirky ini library
3124
# * find all `key="...\"..."` lines
3225
# * remove the leading quote
3326
# * remove the trailing quote
File renamed without changes.

0 commit comments

Comments
 (0)