mirror of
https://github.com/go-gitea/gitea.git
synced 2025-01-02 01:17:43 +03:00
Compare commits
33 Commits
db7c0c9b80
...
cbf8a0e746
Author | SHA1 | Date | |
---|---|---|---|
|
cbf8a0e746 | ||
|
d45456b1b5 | ||
|
8eecca3478 | ||
|
1e2c8eb494 | ||
|
dafadf0028 | ||
|
f4ccbd38dc | ||
|
344c89ea34 | ||
|
232867cff6 | ||
|
cd1b5488a3 | ||
|
1dbf0d7f08 | ||
|
a96776b3cb | ||
|
ff96873e3e | ||
|
0ed160ffea | ||
|
e95b946f6d | ||
|
64bebc9402 | ||
|
94048f3035 | ||
|
a92f5057ae | ||
|
3d3ece36d2 | ||
|
e69da2cd07 | ||
|
e435b1900a | ||
|
254314be5f | ||
|
14ed553fae | ||
|
079a1ffe8f | ||
|
ea198f9ea8 | ||
|
a7b2707be9 | ||
|
2d1a171dc7 | ||
|
3c00e89129 | ||
|
df98452c0d | ||
|
44b4fb21a4 | ||
|
7bb7ba1b5b | ||
|
97feabdf39 | ||
|
c5d97ddcfa | ||
|
6ec5cb77bd |
@ -674,7 +674,7 @@ module.exports = {
|
||||
'no-this-before-super': [2],
|
||||
'no-throw-literal': [2],
|
||||
'no-undef-init': [2],
|
||||
'no-undef': [0],
|
||||
'no-undef': [2], // it is still needed by eslint & IDE to prompt undefined names in real time
|
||||
'no-undefined': [0],
|
||||
'no-underscore-dangle': [0],
|
||||
'no-unexpected-multiline': [2],
|
||||
|
10
Makefile
10
Makefile
@ -806,22 +806,22 @@ $(DIST_DIRS):
|
||||
|
||||
.PHONY: release-windows
|
||||
release-windows: | $(DIST_DIRS)
|
||||
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
|
||||
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'osusergo $(TAGS)' -ldflags '-s -w -linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
|
||||
ifeq (,$(findstring gogit,$(TAGS)))
|
||||
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'osusergo gogit $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION)-gogit .
|
||||
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'osusergo gogit $(TAGS)' -ldflags '-s -w -linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION)-gogit .
|
||||
endif
|
||||
|
||||
.PHONY: release-linux
|
||||
release-linux: | $(DIST_DIRS)
|
||||
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets '$(LINUX_ARCHS)' -out gitea-$(VERSION) .
|
||||
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-s -w -linkmode external -extldflags "-static" $(LDFLAGS)' -targets '$(LINUX_ARCHS)' -out gitea-$(VERSION) .
|
||||
|
||||
.PHONY: release-darwin
|
||||
release-darwin: | $(DIST_DIRS)
|
||||
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin-10.12/amd64,darwin-10.12/arm64' -out gitea-$(VERSION) .
|
||||
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-s -w $(LDFLAGS)' -targets 'darwin-10.12/amd64,darwin-10.12/arm64' -out gitea-$(VERSION) .
|
||||
|
||||
.PHONY: release-freebsd
|
||||
release-freebsd: | $(DIST_DIRS)
|
||||
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'freebsd/amd64' -out gitea-$(VERSION) .
|
||||
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-s -w $(LDFLAGS)' -targets 'freebsd/amd64' -out gitea-$(VERSION) .
|
||||
|
||||
.PHONY: release-copy
|
||||
release-copy: | $(DIST_DIRS)
|
||||
|
60
assets/go-licenses.json
generated
60
assets/go-licenses.json
generated
File diff suppressed because one or more lines are too long
@ -69,6 +69,10 @@ var microcmdUserCreate = &cli.Command{
|
||||
}
|
||||
|
||||
func runCreateUser(c *cli.Context) error {
|
||||
// this command highly depends on the many setting options (create org, visibility, etc.), so it must have a full setting load first
|
||||
// duplicate setting loading should be safe at the moment, but it should be refactored & improved in the future.
|
||||
setting.LoadSettings()
|
||||
|
||||
if err := argsSet(c, "email"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
11
cmd/web.go
11
cmd/web.go
@ -12,6 +12,7 @@ import (
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
_ "net/http/pprof" // Used for debugging if enabled and a web server is running
|
||||
|
||||
@ -115,6 +116,16 @@ func showWebStartupMessage(msg string) {
|
||||
log.Info("* CustomPath: %s", setting.CustomPath)
|
||||
log.Info("* ConfigFile: %s", setting.CustomConf)
|
||||
log.Info("%s", msg) // show startup message
|
||||
|
||||
if setting.CORSConfig.Enabled {
|
||||
log.Info("CORS Service Enabled")
|
||||
}
|
||||
if setting.DefaultUILocation != time.Local {
|
||||
log.Info("Default UI Location is %v", setting.DefaultUILocation.String())
|
||||
}
|
||||
if setting.MailService != nil {
|
||||
log.Info("Mail Service Enabled: RegisterEmailConfirm=%v, Service.EnableNotifyMail=%v", setting.Service.RegisterEmailConfirm, setting.Service.EnableNotifyMail)
|
||||
}
|
||||
}
|
||||
|
||||
func serveInstall(ctx *cli.Context) error {
|
||||
|
@ -1339,6 +1339,9 @@ LEVEL = Info
|
||||
;; Number of repos that are displayed on one page
|
||||
;REPO_PAGING_NUM = 15
|
||||
|
||||
;; Number of orgs that are displayed on profile page
|
||||
;ORG_PAGING_NUM = 15
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;[ui.meta]
|
||||
|
10
go.mod
10
go.mod
@ -28,7 +28,6 @@ require (
|
||||
github.com/PuerkitoBio/goquery v1.10.0
|
||||
github.com/SaveTheRbtz/zstd-seekable-format-go/pkg v0.7.3
|
||||
github.com/alecthomas/chroma/v2 v2.14.0
|
||||
github.com/aws/aws-sdk-go v1.55.5
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.17.42
|
||||
github.com/aws/aws-sdk-go-v2/service/codecommit v1.27.3
|
||||
github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb
|
||||
@ -61,7 +60,6 @@ require (
|
||||
github.com/go-redsync/redsync/v4 v4.13.0
|
||||
github.com/go-sql-driver/mysql v1.8.1
|
||||
github.com/go-swagger/go-swagger v0.31.0
|
||||
github.com/go-testfixtures/testfixtures/v3 v3.11.0
|
||||
github.com/go-webauthn/webauthn v0.11.2
|
||||
github.com/gobwas/glob v0.2.3
|
||||
github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f
|
||||
@ -145,8 +143,6 @@ require (
|
||||
filippo.io/edwards25519 v1.1.0 // indirect
|
||||
git.sr.ht/~mariusor/go-xsd-duration v0.0.0-20220703122237-02e73435a078 // indirect
|
||||
github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect
|
||||
github.com/ClickHouse/ch-go v0.63.1 // indirect
|
||||
github.com/ClickHouse/clickhouse-go/v2 v2.24.0 // indirect
|
||||
github.com/DataDog/zstd v1.5.6 // indirect
|
||||
github.com/Masterminds/goutils v1.1.1 // indirect
|
||||
github.com/Masterminds/semver/v3 v3.3.0 // indirect
|
||||
@ -204,8 +200,6 @@ require (
|
||||
github.com/go-ap/errors v0.0.0-20240910140019-1e9d33cc1568 // indirect
|
||||
github.com/go-asn1-ber/asn1-ber v1.5.7 // indirect
|
||||
github.com/go-enry/go-oniguruma v1.2.1 // indirect
|
||||
github.com/go-faster/city v1.0.1 // indirect
|
||||
github.com/go-faster/errors v0.7.1 // indirect
|
||||
github.com/go-fed/httpsig v1.1.1-0.20201223112313-55836744818e // indirect
|
||||
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
|
||||
github.com/go-ini/ini v1.67.0 // indirect
|
||||
@ -270,7 +264,6 @@ require (
|
||||
github.com/oklog/ulid v1.3.1 // indirect
|
||||
github.com/olekukonko/tablewriter v0.0.5 // indirect
|
||||
github.com/onsi/ginkgo v1.16.5 // indirect
|
||||
github.com/paulmach/orb v0.11.1 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
|
||||
github.com/pierrec/lz4/v4 v4.1.21 // indirect
|
||||
github.com/pjbgf/sha1cd v0.3.0 // indirect
|
||||
@ -285,7 +278,6 @@ require (
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
github.com/sagikazarmark/locafero v0.6.0 // indirect
|
||||
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
|
||||
github.com/segmentio/asm v1.2.0 // indirect
|
||||
github.com/shopspring/decimal v1.4.0 // indirect
|
||||
github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c // indirect
|
||||
github.com/sirupsen/logrus v1.9.3 // indirect
|
||||
@ -310,8 +302,6 @@ require (
|
||||
github.com/zeebo/blake3 v0.2.4 // indirect
|
||||
go.etcd.io/bbolt v1.3.11 // indirect
|
||||
go.mongodb.org/mongo-driver v1.17.1 // indirect
|
||||
go.opentelemetry.io/otel v1.31.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.31.0 // indirect
|
||||
go.uber.org/atomic v1.11.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
|
62
go.sum
62
go.sum
@ -59,10 +59,6 @@ github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358/go.mod h1:chxPXzS
|
||||
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU=
|
||||
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/ClickHouse/ch-go v0.63.1 h1:s2JyZvWLTCSAGdtjMBBmAgQQHMco6pawLJMOXi0FODM=
|
||||
github.com/ClickHouse/ch-go v0.63.1/go.mod h1:I1kJJCL3WJcBMGe1m+HVK0+nREaG+JOYYBWjrDrF3R0=
|
||||
github.com/ClickHouse/clickhouse-go/v2 v2.24.0 h1:L/n/pVVpk95KtkHOiKuSnO7cu2ckeW4gICbbOh5qs74=
|
||||
github.com/ClickHouse/clickhouse-go/v2 v2.24.0/go.mod h1:iDTViXk2Fgvf1jn2dbJd1ys+fBkdD1UMRnXlwmhijhQ=
|
||||
github.com/DataDog/zstd v1.5.6 h1:LbEglqepa/ipmmQJUDnSsfvA8e8IStVcGaFWDuxvGOY=
|
||||
github.com/DataDog/zstd v1.5.6/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
|
||||
github.com/Julusian/godocdown v0.0.0-20170816220326-6d19f8ff2df8/go.mod h1:INZr5t32rG59/5xeltqoCJoNY7e5x/3xoY9WSWVWg74=
|
||||
@ -109,8 +105,6 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd
|
||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
|
||||
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so=
|
||||
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
|
||||
github.com/aws/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU=
|
||||
github.com/aws/aws-sdk-go v1.55.5/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU=
|
||||
github.com/aws/aws-sdk-go-v2 v1.32.3 h1:T0dRlFBKcdaUPGNtkBSwHZxrtis8CQU17UpNBZYd0wk=
|
||||
github.com/aws/aws-sdk-go-v2 v1.32.3/go.mod h1:2SK5n0a2karNTv5tbP1SjsX0uhttou00v/HpXKM1ZUo=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.17.42 h1:sBP0RPjBU4neGpIYyx8mkU2QqLPl5u9cmdTWVzIpHkM=
|
||||
@ -237,8 +231,6 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davidmz/go-pageant v1.0.2 h1:bPblRCh5jGU+Uptpz6LgMZGD5hJoOt7otgT454WvHn0=
|
||||
github.com/davidmz/go-pageant v1.0.2/go.mod h1:P2EDDnMqIwG5Rrp05dTRITj9z2zpGcD9efWSkTNKLIE=
|
||||
github.com/denisenkom/go-mssqldb v0.12.3 h1:pBSGx9Tq67pBOTLmxNuirNTeB8Vjmf886Kx+8Y+8shw=
|
||||
github.com/denisenkom/go-mssqldb v0.12.3/go.mod h1:k0mtMFOnU+AihqFxPMiF05rtiDrorD1Vrm1KEz5hxDo=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/dimiro1/reply v0.0.0-20200315094148-d0136a4c9e21 h1:PdsjTl0Cg+ZJgOx/CFV5NNgO1ThTreqdgKYiDCMHJwA=
|
||||
@ -317,10 +309,6 @@ github.com/go-enry/go-enry/v2 v2.9.1 h1:G9iDteJ/Mc0F4Di5NeQknf83R2OkRbwY9cAYmcqV
|
||||
github.com/go-enry/go-enry/v2 v2.9.1/go.mod h1:9yrj4ES1YrbNb1Wb7/PWYr2bpaCXUGRt0uafN0ISyG8=
|
||||
github.com/go-enry/go-oniguruma v1.2.1 h1:k8aAMuJfMrqm/56SG2lV9Cfti6tC4x8673aHCcBk+eo=
|
||||
github.com/go-enry/go-oniguruma v1.2.1/go.mod h1:bWDhYP+S6xZQgiRL7wlTScFYBe023B6ilRZbCAD5Hf4=
|
||||
github.com/go-faster/city v1.0.1 h1:4WAxSZ3V2Ws4QRDrscLEDcibJY8uf41H6AhXDrNDcGw=
|
||||
github.com/go-faster/city v1.0.1/go.mod h1:jKcUJId49qdW3L1qKHH/3wPeUstCVpVSXTM6vO3VcTw=
|
||||
github.com/go-faster/errors v0.7.1 h1:MkJTnDoEdi9pDabt1dpWf7AA8/BaSYZqibYyhZ20AYg=
|
||||
github.com/go-faster/errors v0.7.1/go.mod h1:5ySTjWFiphBs07IKuiL69nxdfd5+fzh1u7FPGZP2quo=
|
||||
github.com/go-fed/httpsig v1.1.1-0.20201223112313-55836744818e h1:oRq/fiirun5HqlEWMLIcDmLpIELlG4iGbd0s8iqgPi8=
|
||||
github.com/go-fed/httpsig v1.1.1-0.20201223112313-55836744818e/go.mod h1:RCMrTZvN1bJYtofsG4rd5NaO5obxQ5xBkdiS7xsT7bM=
|
||||
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=
|
||||
@ -372,8 +360,6 @@ github.com/go-swagger/go-swagger v0.31.0/go.mod h1:WSigRRWEig8zV6t6Sm8Y+EmUjlzA/
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg=
|
||||
github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
|
||||
github.com/go-testfixtures/testfixtures/v3 v3.11.0 h1:XxQr8AnPORcZkyNd7go5UNLPD3dULN8ixYISlzrlfEQ=
|
||||
github.com/go-testfixtures/testfixtures/v3 v3.11.0/go.mod h1:THmudHF1Ixq++J2/UodcJpxUphfyEd77m83TvDtryqE=
|
||||
github.com/go-webauthn/webauthn v0.11.2 h1:Fgx0/wlmkClTKlnOsdOQ+K5HcHDsDcYIvtYmfhEOSUc=
|
||||
github.com/go-webauthn/webauthn v0.11.2/go.mod h1:aOtudaF94pM71g3jRwTYYwQTG1KyTILTcZqN1srkmD0=
|
||||
github.com/go-webauthn/x v0.1.15 h1:eG1OhggBJTkDE8gUeOlGRbRe8E/PSVG26YG4AyFbwkU=
|
||||
@ -385,7 +371,6 @@ github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6Wezm
|
||||
github.com/gobwas/ws v1.2.1/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY=
|
||||
github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA=
|
||||
github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
|
||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f h1:3BSP1Tbs2djlpprl7wCLuiqMaUh5SJkkzI2gDs+FgLs=
|
||||
github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f/go.mod h1:Pcatq5tYkCW2Q6yrR2VRHlbHpZ/R4/7qyL1TCF7vl14=
|
||||
github.com/gogs/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85 h1:UjoPNDAQ5JPCjlxoJd6K8ALZqSDDhk2ymieAZOVaDg0=
|
||||
@ -410,7 +395,6 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
@ -497,22 +481,6 @@ github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI
|
||||
github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20230524184225-eabc099b10ab/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw=
|
||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8=
|
||||
github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=
|
||||
github.com/jackc/pgconn v1.14.3 h1:bVoTr12EGANZz66nZPkMInAV/KHD2TxH9npjXXgiB3w=
|
||||
github.com/jackc/pgconn v1.14.3/go.mod h1:RZbme4uasqzybK2RK5c65VsHxoyaml09lx3tXOcO/VM=
|
||||
github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE=
|
||||
github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8=
|
||||
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
|
||||
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
|
||||
github.com/jackc/pgproto3/v2 v2.3.3 h1:1HLSx5H+tXR9pW3in3zaztoEwQYRC9SQaYUHjTSUOag=
|
||||
github.com/jackc/pgproto3/v2 v2.3.3/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
|
||||
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk=
|
||||
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=
|
||||
github.com/jackc/pgtype v1.14.0 h1:y+xUdabmyMkJLyApYuPj38mW+aAIqCe5uuBB51rH3Vw=
|
||||
github.com/jackc/pgtype v1.14.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=
|
||||
github.com/jackc/pgx/v4 v4.18.3 h1:dE2/TrEsGX3RBprb3qryqSV9Y60iZN1C6i8IrmW9/BA=
|
||||
github.com/jackc/pgx/v4 v4.18.3/go.mod h1:Ey4Oru5tH5sB6tV7hDmfWFahwF15Eb7DNXlRKx2CkVw=
|
||||
github.com/jaytaylor/html2text v0.0.0-20230321000545-74c2419ad056 h1:iCHtR9CQyktQ5+f3dMVZfwD2KWJUgm7M0gdL9NGr8KA=
|
||||
github.com/jaytaylor/html2text v0.0.0-20230321000545-74c2419ad056/go.mod h1:CVKlgaMiht+LXvHG173ujK6JUhZXKb2u/BQtjPDIvyk=
|
||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
|
||||
@ -533,10 +501,6 @@ github.com/jessevdk/go-flags v1.6.1 h1:Cvu5U8UGrLay1rZfv/zP7iLpSHGUZ/Ou68T0iX1bB
|
||||
github.com/jessevdk/go-flags v1.6.1/go.mod h1:Mk8T1hIAWpOiJiHa9rJASDK2UGWji0EuPGBnNLMooyc=
|
||||
github.com/jhillyerd/enmime v1.3.0 h1:LV5kzfLidiOr8qRGIpYYmUZCnhrPbcFAnAFUnWn99rw=
|
||||
github.com/jhillyerd/enmime v1.3.0/go.mod h1:6c6jg5HdRRV2FtvVL69LjiX1M8oE0xDX9VEhV3oy4gs=
|
||||
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
|
||||
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
|
||||
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
|
||||
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
|
||||
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
|
||||
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
|
||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||
@ -550,11 +514,8 @@ github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4
|
||||
github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
|
||||
github.com/keybase/go-crypto v0.0.0-20200123153347-de78d2cb44f4 h1:cTxwSmnaqLoo+4tLukHoB9iqHOu3LmLhRmgUxZo6Vp4=
|
||||
github.com/keybase/go-crypto v0.0.0-20200123153347-de78d2cb44f4/go.mod h1:ghbZscTyKdM07+Fw3KSi0hcJm+AlEUWj8QLlPtijN/M=
|
||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
|
||||
github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
||||
github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
|
||||
github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc=
|
||||
github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0=
|
||||
github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
|
||||
@ -629,7 +590,6 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
|
||||
github.com/mrjones/oauth v0.0.0-20190623134757-126b35219450 h1:j2kD3MT1z4PXCiUllUJF9mWUESr9TWKS7iEKsQ/IipM=
|
||||
github.com/mrjones/oauth v0.0.0-20190623134757-126b35219450/go.mod h1:skjdDftzkFALcuGzYSklqYd8gvat6F1gZJ4YPVbkZpM=
|
||||
github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg=
|
||||
@ -670,9 +630,6 @@ github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3I
|
||||
github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug=
|
||||
github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM=
|
||||
github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde/go.mod h1:nZgzbfBr3hhjoZnS66nKrHmduYNpc34ny7RK4z5/HM0=
|
||||
github.com/paulmach/orb v0.11.1 h1:3koVegMC4X/WeiXYz9iswopaTwMem53NzTJuTF20JzU=
|
||||
github.com/paulmach/orb v0.11.1/go.mod h1:5mULz1xQfs3bmQm63QEJA6lNGujuRafwA5S/EnuLaLU=
|
||||
github.com/paulmach/protoscan v0.2.1/go.mod h1:SpcSwydNLrxUGSDvXvO0P7g7AuhJ7lcKfDlhJCDw2gY=
|
||||
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||
github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M=
|
||||
github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc=
|
||||
@ -735,8 +692,6 @@ github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6Ng
|
||||
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY=
|
||||
github.com/sassoftware/go-rpmutils v0.4.0 h1:ojND82NYBxgwrV+mX1CWsd5QJvvEZTKddtCdFLPWhpg=
|
||||
github.com/sassoftware/go-rpmutils v0.4.0/go.mod h1:3goNWi7PGAT3/dlql2lv3+MSN5jNYPjT5mVcQcIsYzI=
|
||||
github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys=
|
||||
github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs=
|
||||
github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516/go.mod h1:Yow6lPLSAXx2ifx470yD/nUe22Dv5vBvxK/UK9UUTVs=
|
||||
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
|
||||
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=
|
||||
@ -783,7 +738,6 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
@ -797,7 +751,6 @@ github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8
|
||||
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
|
||||
github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE=
|
||||
github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ=
|
||||
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
|
||||
github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
|
||||
github.com/toqueteos/webbrowser v1.2.0 h1:tVP/gpK69Fx+qMJKsLE7TD8LuGWPnEV71wBN9rrstGQ=
|
||||
github.com/toqueteos/webbrowser v1.2.0/go.mod h1:XWoZq4cyp9WeUeak7w7LXRUQf1F1ATJMir8RTqb4ayM=
|
||||
@ -823,9 +776,6 @@ github.com/xanzy/go-gitlab v0.112.0 h1:6Z0cqEooCvBMfBIHw+CgO4AKGRV8na/9781xOb0+D
|
||||
github.com/xanzy/go-gitlab v0.112.0/go.mod h1:wKNKh3GkYDMOsGmnfuX+ITCmDuSDWFO0G+C4AygL9RY=
|
||||
github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=
|
||||
github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=
|
||||
github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=
|
||||
github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g=
|
||||
github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8=
|
||||
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
|
||||
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo=
|
||||
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
|
||||
@ -842,9 +792,7 @@ github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZ
|
||||
github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E=
|
||||
github.com/yohcop/openid-go v1.0.1 h1:DPRd3iPO5F6O5zX2e62XpVAbPT6wV51cuucH0z9g3js=
|
||||
github.com/yohcop/openid-go v1.0.1/go.mod h1:b/AvD03P0KHj4yuihb+VtLD6bYYgsy0zqBzPCRjkCNs=
|
||||
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
|
||||
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/yuin/goldmark v1.4.15/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
@ -863,13 +811,8 @@ github.com/zeebo/pcg v1.0.1/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l
|
||||
go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
|
||||
go.etcd.io/bbolt v1.3.11 h1:yGEzV1wPz2yVCLsD8ZAiGHhHVlczyC9d1rP43/VCRJ0=
|
||||
go.etcd.io/bbolt v1.3.11/go.mod h1:dksAq7YMXoljX0xu6VF5DMZGbhYYoLUalEiSySYAS4I=
|
||||
go.mongodb.org/mongo-driver v1.11.4/go.mod h1:PTSz5yu21bkT/wXpkS7WR5f0ddqw5quethTUn9WM+2g=
|
||||
go.mongodb.org/mongo-driver v1.17.1 h1:Wic5cJIwJgSpBhe3lx3+/RybR5PiYRMpVFgO7cOHyIM=
|
||||
go.mongodb.org/mongo-driver v1.17.1/go.mod h1:wwWm/+BuOddhcq3n68LKRmgk2wXzmF6s0SFOa0GINL4=
|
||||
go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY=
|
||||
go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE=
|
||||
go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys=
|
||||
go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A=
|
||||
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
||||
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
|
||||
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
|
||||
@ -941,7 +884,6 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||
@ -1022,10 +964,8 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200325010219-a49f79bcc224/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
|
||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200928182047-19e03678916f/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU=
|
||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
|
||||
@ -1046,8 +986,6 @@ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQ
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA=
|
||||
google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
|
@ -16,6 +16,7 @@ import (
|
||||
"code.gitea.io/gitea/modules/git"
|
||||
"code.gitea.io/gitea/modules/gitrepo"
|
||||
|
||||
"xorm.io/builder"
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
@ -337,8 +338,10 @@ func newlyCreatedIssues(ctx context.Context, repoID int64, fromTime time.Time) *
|
||||
func activeIssues(ctx context.Context, repoID int64, fromTime time.Time) *xorm.Session {
|
||||
sess := db.GetEngine(ctx).Where("issue.repo_id = ?", repoID).
|
||||
And("issue.is_pull = ?", false).
|
||||
And("issue.created_unix >= ?", fromTime.Unix()).
|
||||
Or("issue.closed_unix >= ?", fromTime.Unix())
|
||||
And(builder.Or(
|
||||
builder.Gte{"issue.created_unix": fromTime.Unix()},
|
||||
builder.Gte{"issue.closed_unix": fromTime.Unix()},
|
||||
))
|
||||
|
||||
return sess
|
||||
}
|
||||
|
@ -64,11 +64,9 @@ func TestGetUserHeatmapDataByUser(t *testing.T) {
|
||||
for _, tc := range testCases {
|
||||
user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: tc.userID})
|
||||
|
||||
doer := &user_model.User{ID: tc.doerID}
|
||||
_, err := unittest.LoadBeanIfExists(doer)
|
||||
assert.NoError(t, err)
|
||||
if tc.doerID == 0 {
|
||||
doer = nil
|
||||
var doer *user_model.User
|
||||
if tc.doerID != 0 {
|
||||
doer = unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: tc.doerID})
|
||||
}
|
||||
|
||||
// get the action for comparison
|
||||
|
@ -44,7 +44,7 @@ func TestWebAuthnCredential_UpdateSignCount(t *testing.T) {
|
||||
cred := unittest.AssertExistsAndLoadBean(t, &auth_model.WebAuthnCredential{ID: 1})
|
||||
cred.SignCount = 1
|
||||
assert.NoError(t, cred.UpdateSignCount(db.DefaultContext))
|
||||
unittest.AssertExistsIf(t, true, &auth_model.WebAuthnCredential{ID: 1, SignCount: 1})
|
||||
unittest.AssertExistsAndLoadBean(t, &auth_model.WebAuthnCredential{ID: 1, SignCount: 1})
|
||||
}
|
||||
|
||||
func TestWebAuthnCredential_UpdateLargeCounter(t *testing.T) {
|
||||
@ -52,7 +52,7 @@ func TestWebAuthnCredential_UpdateLargeCounter(t *testing.T) {
|
||||
cred := unittest.AssertExistsAndLoadBean(t, &auth_model.WebAuthnCredential{ID: 1})
|
||||
cred.SignCount = 0xffffffff
|
||||
assert.NoError(t, cred.UpdateSignCount(db.DefaultContext))
|
||||
unittest.AssertExistsIf(t, true, &auth_model.WebAuthnCredential{ID: 1, SignCount: 0xffffffff})
|
||||
unittest.AssertExistsAndLoadBean(t, &auth_model.WebAuthnCredential{ID: 1, SignCount: 0xffffffff})
|
||||
}
|
||||
|
||||
func TestCreateCredential(t *testing.T) {
|
||||
@ -63,5 +63,5 @@ func TestCreateCredential(t *testing.T) {
|
||||
assert.Equal(t, "WebAuthn Created Credential", res.Name)
|
||||
assert.Equal(t, []byte("Test"), res.CredentialID)
|
||||
|
||||
unittest.AssertExistsIf(t, true, &auth_model.WebAuthnCredential{Name: "WebAuthn Created Credential", UserID: 1})
|
||||
unittest.AssertExistsAndLoadBean(t, &auth_model.WebAuthnCredential{Name: "WebAuthn Created Credential", UserID: 1})
|
||||
}
|
||||
|
@ -64,7 +64,7 @@
|
||||
name: job2
|
||||
attempt: 1
|
||||
job_id: job2
|
||||
needs: [job1]
|
||||
needs: '["job1"]'
|
||||
task_id: 51
|
||||
status: 5
|
||||
started: 1683636528
|
||||
|
@ -96,3 +96,14 @@
|
||||
num_issues: 0
|
||||
num_closed_issues: 0
|
||||
archived_unix: 0
|
||||
|
||||
-
|
||||
id: 10
|
||||
repo_id: 3
|
||||
org_id: 0
|
||||
name: repo3label1
|
||||
color: '#112233'
|
||||
exclusive: false
|
||||
num_issues: 0
|
||||
num_closed_issues: 0
|
||||
archived_unix: 0
|
||||
|
@ -2,23 +2,23 @@
|
||||
id: 1
|
||||
repo_id: 4
|
||||
name_pattern: /v.+/
|
||||
allowlist_user_i_ds: []
|
||||
allowlist_team_i_ds: []
|
||||
allowlist_user_i_ds: "[]"
|
||||
allowlist_team_i_ds: "[]"
|
||||
created_unix: 1715596037
|
||||
updated_unix: 1715596037
|
||||
-
|
||||
id: 2
|
||||
repo_id: 1
|
||||
name_pattern: v-*
|
||||
allowlist_user_i_ds: []
|
||||
allowlist_team_i_ds: []
|
||||
allowlist_user_i_ds: "[]"
|
||||
allowlist_team_i_ds: "[]"
|
||||
created_unix: 1715596037
|
||||
updated_unix: 1715596037
|
||||
-
|
||||
id: 3
|
||||
repo_id: 1
|
||||
name_pattern: v-1.1
|
||||
allowlist_user_i_ds: [2]
|
||||
allowlist_team_i_ds: []
|
||||
allowlist_user_i_ds: "[2]"
|
||||
allowlist_team_i_ds: "[]"
|
||||
created_unix: 1715596037
|
||||
updated_unix: 1715596037
|
||||
|
@ -34,7 +34,7 @@ func UpdateIssueCols(ctx context.Context, issue *Issue, cols ...string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func changeIssueStatus(ctx context.Context, issue *Issue, doer *user_model.User, isClosed, isMergePull bool) (*Comment, error) {
|
||||
func ChangeIssueStatus(ctx context.Context, issue *Issue, doer *user_model.User, isClosed, isMergePull bool) (*Comment, error) {
|
||||
// Reload the issue
|
||||
currentIssue, err := GetIssueByID(ctx, issue.ID)
|
||||
if err != nil {
|
||||
@ -134,7 +134,7 @@ func CloseIssue(ctx context.Context, issue *Issue, doer *user_model.User) (*Comm
|
||||
}
|
||||
defer committer.Close()
|
||||
|
||||
comment, err := changeIssueStatus(ctx, issue, doer, true, false)
|
||||
comment, err := ChangeIssueStatus(ctx, issue, doer, true, false)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -159,7 +159,7 @@ func ReopenIssue(ctx context.Context, issue *Issue, doer *user_model.User) (*Com
|
||||
}
|
||||
defer committer.Close()
|
||||
|
||||
comment, err := changeIssueStatus(ctx, issue, doer, false, false)
|
||||
comment, err := ChangeIssueStatus(ctx, issue, doer, false, false)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ import (
|
||||
"code.gitea.io/gitea/models/unittest"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func Test_NewIssueUsers(t *testing.T) {
|
||||
@ -27,9 +28,8 @@ func Test_NewIssueUsers(t *testing.T) {
|
||||
}
|
||||
|
||||
// artificially insert new issue
|
||||
unittest.AssertSuccessfulInsert(t, newIssue)
|
||||
|
||||
assert.NoError(t, issues_model.NewIssueUsers(db.DefaultContext, repo, newIssue))
|
||||
require.NoError(t, db.Insert(db.DefaultContext, newIssue))
|
||||
require.NoError(t, issues_model.NewIssueUsers(db.DefaultContext, repo, newIssue))
|
||||
|
||||
// issue_user table should now have entries for new issue
|
||||
unittest.AssertExistsAndLoadBean(t, &issues_model.IssueUser{IssueID: newIssue.ID, UID: newIssue.PosterID})
|
||||
|
@ -349,6 +349,17 @@ func GetLabelIDsInRepoByNames(ctx context.Context, repoID int64, labelNames []st
|
||||
Find(&labelIDs)
|
||||
}
|
||||
|
||||
// GetLabelIDsInOrgByNames returns a list of labelIDs by names in a given org.
|
||||
func GetLabelIDsInOrgByNames(ctx context.Context, orgID int64, labelNames []string) ([]int64, error) {
|
||||
labelIDs := make([]int64, 0, len(labelNames))
|
||||
return labelIDs, db.GetEngine(ctx).Table("label").
|
||||
Where("org_id = ?", orgID).
|
||||
In("name", labelNames).
|
||||
Asc("name").
|
||||
Cols("id").
|
||||
Find(&labelIDs)
|
||||
}
|
||||
|
||||
// BuildLabelNamesIssueIDsCondition returns a builder where get issue ids match label names
|
||||
func BuildLabelNamesIssueIDsCondition(labelNames []string) *builder.Builder {
|
||||
return builder.Select("issue_label.issue_id").
|
||||
|
@ -387,7 +387,7 @@ func TestDeleteIssueLabel(t *testing.T) {
|
||||
|
||||
expectedNumIssues := label.NumIssues
|
||||
expectedNumClosedIssues := label.NumClosedIssues
|
||||
if unittest.BeanExists(t, &issues_model.IssueLabel{IssueID: issueID, LabelID: labelID}) {
|
||||
if unittest.GetBean(t, &issues_model.IssueLabel{IssueID: issueID, LabelID: labelID}) != nil {
|
||||
expectedNumIssues--
|
||||
if issue.IsClosed {
|
||||
expectedNumClosedIssues--
|
||||
|
@ -499,65 +499,6 @@ func (pr *PullRequest) IsFromFork() bool {
|
||||
return pr.HeadRepoID != pr.BaseRepoID
|
||||
}
|
||||
|
||||
// SetMerged sets a pull request to merged and closes the corresponding issue
|
||||
func (pr *PullRequest) SetMerged(ctx context.Context) (bool, error) {
|
||||
if pr.HasMerged {
|
||||
return false, fmt.Errorf("PullRequest[%d] already merged", pr.Index)
|
||||
}
|
||||
if pr.MergedCommitID == "" || pr.MergedUnix == 0 || pr.Merger == nil {
|
||||
return false, fmt.Errorf("Unable to merge PullRequest[%d], some required fields are empty", pr.Index)
|
||||
}
|
||||
|
||||
pr.HasMerged = true
|
||||
sess := db.GetEngine(ctx)
|
||||
|
||||
if _, err := sess.Exec("UPDATE `issue` SET `repo_id` = `repo_id` WHERE `id` = ?", pr.IssueID); err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
if _, err := sess.Exec("UPDATE `pull_request` SET `issue_id` = `issue_id` WHERE `id` = ?", pr.ID); err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
pr.Issue = nil
|
||||
if err := pr.LoadIssue(ctx); err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
if tmpPr, err := GetPullRequestByID(ctx, pr.ID); err != nil {
|
||||
return false, err
|
||||
} else if tmpPr.HasMerged {
|
||||
if pr.Issue.IsClosed {
|
||||
return false, nil
|
||||
}
|
||||
return false, fmt.Errorf("PullRequest[%d] already merged but it's associated issue [%d] is not closed", pr.Index, pr.IssueID)
|
||||
} else if pr.Issue.IsClosed {
|
||||
return false, fmt.Errorf("PullRequest[%d] already closed", pr.Index)
|
||||
}
|
||||
|
||||
if err := pr.Issue.LoadRepo(ctx); err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
if err := pr.Issue.Repo.LoadOwner(ctx); err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
if _, err := changeIssueStatus(ctx, pr.Issue, pr.Merger, true, true); err != nil {
|
||||
return false, fmt.Errorf("Issue.changeStatus: %w", err)
|
||||
}
|
||||
|
||||
// reset the conflicted files as there cannot be any if we're merged
|
||||
pr.ConflictedFiles = []string{}
|
||||
|
||||
// We need to save all of the data used to compute this merge as it may have already been changed by TestPatch. FIXME: need to set some state to prevent TestPatch from running whilst we are merging.
|
||||
if _, err := sess.Where("id = ?", pr.ID).Cols("has_merged, status, merge_base, merged_commit_id, merger_id, merged_unix, conflicted_files").Update(pr); err != nil {
|
||||
return false, fmt.Errorf("Failed to update pr[%d]: %w", pr.ID, err)
|
||||
}
|
||||
|
||||
return true, nil
|
||||
}
|
||||
|
||||
// NewPullRequest creates new pull request with labels for repository.
|
||||
func NewPullRequest(ctx context.Context, repo *repo_model.Repository, issue *Issue, labelIDs []int64, uuids []string, pr *PullRequest) (err error) {
|
||||
ctx, committer, err := db.TxContext(ctx)
|
||||
|
@ -76,7 +76,7 @@ func PrepareTestEnv(t *testing.T, skip int, syncModels ...any) (*xorm.Engine, fu
|
||||
t.Errorf("error whilst initializing fixtures from %s: %v", fixturesDir, err)
|
||||
return x, deferFn
|
||||
}
|
||||
if err := unittest.LoadFixtures(x); err != nil {
|
||||
if err := unittest.LoadFixtures(); err != nil {
|
||||
t.Errorf("error whilst loading fixtures from %s: %v", fixturesDir, err)
|
||||
return x, deferFn
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ func TestAddOrgUser(t *testing.T) {
|
||||
testSuccess := func(orgID, userID int64, isPublic bool) {
|
||||
org := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: orgID})
|
||||
expectedNumMembers := org.NumMembers
|
||||
if !unittest.BeanExists(t, &organization.OrgUser{OrgID: orgID, UID: userID}) {
|
||||
if unittest.GetBean(t, &organization.OrgUser{OrgID: orgID, UID: userID}) == nil {
|
||||
expectedNumMembers++
|
||||
}
|
||||
assert.NoError(t, organization.AddOrgUser(db.DefaultContext, orgID, userID))
|
||||
|
@ -1,97 +1,33 @@
|
||||
// Copyright 2021 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
//nolint:forbidigo
|
||||
package unittest
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"code.gitea.io/gitea/models/db"
|
||||
"code.gitea.io/gitea/modules/auth/password/hash"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
"code.gitea.io/gitea/modules/util"
|
||||
|
||||
"github.com/go-testfixtures/testfixtures/v3"
|
||||
"xorm.io/xorm"
|
||||
"xorm.io/xorm/schemas"
|
||||
)
|
||||
|
||||
var fixturesLoader *testfixtures.Loader
|
||||
type FixturesLoader interface {
|
||||
Load() error
|
||||
}
|
||||
|
||||
var fixturesLoader FixturesLoader
|
||||
|
||||
// GetXORMEngine gets the XORM engine
|
||||
func GetXORMEngine(engine ...*xorm.Engine) (x *xorm.Engine) {
|
||||
if len(engine) == 1 {
|
||||
return engine[0]
|
||||
}
|
||||
func GetXORMEngine() (x *xorm.Engine) {
|
||||
return db.GetEngine(db.DefaultContext).(*xorm.Engine)
|
||||
}
|
||||
|
||||
// InitFixtures initialize test fixtures for a test database
|
||||
func InitFixtures(opts FixturesOptions, engine ...*xorm.Engine) (err error) {
|
||||
e := GetXORMEngine(engine...)
|
||||
var fixtureOptionFiles func(*testfixtures.Loader) error
|
||||
if opts.Dir != "" {
|
||||
fixtureOptionFiles = testfixtures.Directory(opts.Dir)
|
||||
} else {
|
||||
fixtureOptionFiles = testfixtures.Files(opts.Files...)
|
||||
}
|
||||
dialect := "unknown"
|
||||
switch e.Dialect().URI().DBType {
|
||||
case schemas.POSTGRES:
|
||||
dialect = "postgres"
|
||||
case schemas.MYSQL:
|
||||
dialect = "mysql"
|
||||
case schemas.MSSQL:
|
||||
dialect = "mssql"
|
||||
case schemas.SQLITE:
|
||||
dialect = "sqlite3"
|
||||
default:
|
||||
fmt.Println("Unsupported RDBMS for integration tests")
|
||||
os.Exit(1)
|
||||
}
|
||||
loaderOptions := []func(loader *testfixtures.Loader) error{
|
||||
testfixtures.Database(e.DB().DB),
|
||||
testfixtures.Dialect(dialect),
|
||||
testfixtures.DangerousSkipTestDatabaseCheck(),
|
||||
fixtureOptionFiles,
|
||||
}
|
||||
|
||||
if e.Dialect().URI().DBType == schemas.POSTGRES {
|
||||
loaderOptions = append(loaderOptions, testfixtures.SkipResetSequences())
|
||||
}
|
||||
|
||||
fixturesLoader, err = testfixtures.New(loaderOptions...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// register the dummy hash algorithm function used in the test fixtures
|
||||
_ = hash.Register("dummy", hash.NewDummyHasher)
|
||||
|
||||
setting.PasswordHashAlgo, _ = hash.SetDefaultPasswordHashAlgorithm("dummy")
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// LoadFixtures load fixtures for a test database
|
||||
func LoadFixtures(engine ...*xorm.Engine) error {
|
||||
e := GetXORMEngine(engine...)
|
||||
var err error
|
||||
// (doubt) database transaction conflicts could occur and result in ROLLBACK? just try for a few times.
|
||||
for i := 0; i < 5; i++ {
|
||||
if err = fixturesLoader.Load(); err == nil {
|
||||
break
|
||||
}
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
}
|
||||
if err != nil {
|
||||
fmt.Printf("LoadFixtures failed after retries: %v\n", err)
|
||||
}
|
||||
// Now if we're running postgres we need to tell it to update the sequences
|
||||
if e.Dialect().URI().DBType == schemas.POSTGRES {
|
||||
results, err := e.QueryString(`SELECT 'SELECT SETVAL(' ||
|
||||
func loadFixtureResetSeqPgsql(e *xorm.Engine) error {
|
||||
results, err := e.QueryString(`SELECT 'SELECT SETVAL(' ||
|
||||
quote_literal(quote_ident(PGT.schemaname) || '.' || quote_ident(S.relname)) ||
|
||||
', COALESCE(MAX(' ||quote_ident(C.attname)|| '), 1) ) FROM ' ||
|
||||
quote_ident(PGT.schemaname)|| '.'||quote_ident(T.relname)|| ';'
|
||||
@ -107,22 +43,42 @@ func LoadFixtures(engine ...*xorm.Engine) error {
|
||||
AND D.refobjsubid = C.attnum
|
||||
AND T.relname = PGT.tablename
|
||||
ORDER BY S.relname;`)
|
||||
if err != nil {
|
||||
fmt.Printf("Failed to generate sequence update: %v\n", err)
|
||||
return err
|
||||
}
|
||||
for _, r := range results {
|
||||
for _, value := range r {
|
||||
_, err = e.Exec(value)
|
||||
if err != nil {
|
||||
fmt.Printf("Failed to update sequence: %s Error: %v\n", value, err)
|
||||
return err
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to generate sequence update: %w", err)
|
||||
}
|
||||
for _, r := range results {
|
||||
for _, value := range r {
|
||||
_, err = e.Exec(value)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to update sequence: %s, error: %w", value, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// InitFixtures initialize test fixtures for a test database
|
||||
func InitFixtures(opts FixturesOptions, engine ...*xorm.Engine) (err error) {
|
||||
xormEngine := util.IfZero(util.OptionalArg(engine), GetXORMEngine())
|
||||
fixturesLoader, err = NewFixturesLoader(xormEngine, opts)
|
||||
// fixturesLoader = NewFixturesLoaderVendor(xormEngine, opts)
|
||||
|
||||
// register the dummy hash algorithm function used in the test fixtures
|
||||
_ = hash.Register("dummy", hash.NewDummyHasher)
|
||||
setting.PasswordHashAlgo, _ = hash.SetDefaultPasswordHashAlgorithm("dummy")
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// LoadFixtures load fixtures for a test database
|
||||
func LoadFixtures() error {
|
||||
if err := fixturesLoader.Load(); err != nil {
|
||||
return err
|
||||
}
|
||||
// Now if we're running postgres we need to tell it to update the sequences
|
||||
if GetXORMEngine().Dialect().URI().DBType == schemas.POSTGRES {
|
||||
if err := loadFixtureResetSeqPgsql(GetXORMEngine()); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
201
models/unittest/fixtures_loader.go
Normal file
201
models/unittest/fixtures_loader.go
Normal file
@ -0,0 +1,201 @@
|
||||
// Copyright 2024 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package unittest
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"gopkg.in/yaml.v3"
|
||||
"xorm.io/xorm"
|
||||
"xorm.io/xorm/schemas"
|
||||
)
|
||||
|
||||
type fixtureItem struct {
|
||||
tableName string
|
||||
tableNameQuoted string
|
||||
sqlInserts []string
|
||||
sqlInsertArgs [][]any
|
||||
|
||||
mssqlHasIdentityColumn bool
|
||||
}
|
||||
|
||||
type fixturesLoaderInternal struct {
|
||||
db *sql.DB
|
||||
dbType schemas.DBType
|
||||
files []string
|
||||
fixtures map[string]*fixtureItem
|
||||
quoteObject func(string) string
|
||||
paramPlaceholder func(idx int) string
|
||||
}
|
||||
|
||||
func (f *fixturesLoaderInternal) mssqlTableHasIdentityColumn(db *sql.DB, tableName string) (bool, error) {
|
||||
row := db.QueryRow(`SELECT COUNT(*) FROM sys.identity_columns WHERE OBJECT_ID = OBJECT_ID(?)`, tableName)
|
||||
var count int
|
||||
if err := row.Scan(&count); err != nil {
|
||||
return false, err
|
||||
}
|
||||
return count > 0, nil
|
||||
}
|
||||
|
||||
func (f *fixturesLoaderInternal) preprocessFixtureRow(row []map[string]any) (err error) {
|
||||
for _, m := range row {
|
||||
for k, v := range m {
|
||||
if s, ok := v.(string); ok {
|
||||
if strings.HasPrefix(s, "0x") {
|
||||
if m[k], err = hex.DecodeString(s[2:]); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (f *fixturesLoaderInternal) prepareFixtureItem(file string) (_ *fixtureItem, err error) {
|
||||
fixture := &fixtureItem{}
|
||||
fixture.tableName, _, _ = strings.Cut(filepath.Base(file), ".")
|
||||
fixture.tableNameQuoted = f.quoteObject(fixture.tableName)
|
||||
|
||||
if f.dbType == schemas.MSSQL {
|
||||
fixture.mssqlHasIdentityColumn, err = f.mssqlTableHasIdentityColumn(f.db, fixture.tableName)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
data, err := os.ReadFile(file)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to read file %q: %w", file, err)
|
||||
}
|
||||
|
||||
var rows []map[string]any
|
||||
if err = yaml.Unmarshal(data, &rows); err != nil {
|
||||
return nil, fmt.Errorf("failed to unmarshal yaml data from %q: %w", file, err)
|
||||
}
|
||||
if err = f.preprocessFixtureRow(rows); err != nil {
|
||||
return nil, fmt.Errorf("failed to preprocess fixture rows from %q: %w", file, err)
|
||||
}
|
||||
|
||||
var sqlBuf []byte
|
||||
var sqlArguments []any
|
||||
for _, row := range rows {
|
||||
sqlBuf = append(sqlBuf, fmt.Sprintf("INSERT INTO %s (", fixture.tableNameQuoted)...)
|
||||
for k, v := range row {
|
||||
sqlBuf = append(sqlBuf, f.quoteObject(k)...)
|
||||
sqlBuf = append(sqlBuf, ","...)
|
||||
sqlArguments = append(sqlArguments, v)
|
||||
}
|
||||
sqlBuf = sqlBuf[:len(sqlBuf)-1]
|
||||
sqlBuf = append(sqlBuf, ") VALUES ("...)
|
||||
paramIdx := 1
|
||||
for range row {
|
||||
sqlBuf = append(sqlBuf, f.paramPlaceholder(paramIdx)...)
|
||||
sqlBuf = append(sqlBuf, ',')
|
||||
paramIdx++
|
||||
}
|
||||
sqlBuf[len(sqlBuf)-1] = ')'
|
||||
fixture.sqlInserts = append(fixture.sqlInserts, string(sqlBuf))
|
||||
fixture.sqlInsertArgs = append(fixture.sqlInsertArgs, slices.Clone(sqlArguments))
|
||||
sqlBuf = sqlBuf[:0]
|
||||
sqlArguments = sqlArguments[:0]
|
||||
}
|
||||
return fixture, nil
|
||||
}
|
||||
|
||||
func (f *fixturesLoaderInternal) loadFixtures(tx *sql.Tx, file string) (err error) {
|
||||
fixture := f.fixtures[file]
|
||||
if fixture == nil {
|
||||
if fixture, err = f.prepareFixtureItem(file); err != nil {
|
||||
return err
|
||||
}
|
||||
f.fixtures[file] = fixture
|
||||
}
|
||||
|
||||
_, err = tx.Exec(fmt.Sprintf("DELETE FROM %s", fixture.tableNameQuoted)) // sqlite3 doesn't support truncate
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if fixture.mssqlHasIdentityColumn {
|
||||
_, err = tx.Exec(fmt.Sprintf("SET IDENTITY_INSERT %s ON", fixture.tableNameQuoted))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer func() { _, err = tx.Exec(fmt.Sprintf("SET IDENTITY_INSERT %s OFF", fixture.tableNameQuoted)) }()
|
||||
}
|
||||
for i := range fixture.sqlInserts {
|
||||
_, err = tx.Exec(fixture.sqlInserts[i], fixture.sqlInsertArgs[i]...)
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (f *fixturesLoaderInternal) Load() error {
|
||||
tx, err := f.db.Begin()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer func() { _ = tx.Rollback() }()
|
||||
|
||||
for _, file := range f.files {
|
||||
if err := f.loadFixtures(tx, file); err != nil {
|
||||
return fmt.Errorf("failed to load fixtures from %s: %w", file, err)
|
||||
}
|
||||
}
|
||||
return tx.Commit()
|
||||
}
|
||||
|
||||
func FixturesFileFullPaths(dir string, files []string) ([]string, error) {
|
||||
if files != nil && len(files) == 0 {
|
||||
return nil, nil // load nothing
|
||||
}
|
||||
files = slices.Clone(files)
|
||||
if len(files) == 0 {
|
||||
entries, err := os.ReadDir(dir)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, e := range entries {
|
||||
files = append(files, e.Name())
|
||||
}
|
||||
}
|
||||
for i, file := range files {
|
||||
if !filepath.IsAbs(file) {
|
||||
files[i] = filepath.Join(dir, file)
|
||||
}
|
||||
}
|
||||
return files, nil
|
||||
}
|
||||
|
||||
func NewFixturesLoader(x *xorm.Engine, opts FixturesOptions) (FixturesLoader, error) {
|
||||
files, err := FixturesFileFullPaths(opts.Dir, opts.Files)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to get fixtures files: %w", err)
|
||||
}
|
||||
f := &fixturesLoaderInternal{db: x.DB().DB, dbType: x.Dialect().URI().DBType, files: files, fixtures: map[string]*fixtureItem{}}
|
||||
switch f.dbType {
|
||||
case schemas.SQLITE:
|
||||
f.quoteObject = func(s string) string { return fmt.Sprintf(`"%s"`, s) }
|
||||
f.paramPlaceholder = func(idx int) string { return "?" }
|
||||
case schemas.POSTGRES:
|
||||
f.quoteObject = func(s string) string { return fmt.Sprintf(`"%s"`, s) }
|
||||
f.paramPlaceholder = func(idx int) string { return fmt.Sprintf(`$%d`, idx) }
|
||||
case schemas.MYSQL:
|
||||
f.quoteObject = func(s string) string { return fmt.Sprintf("`%s`", s) }
|
||||
f.paramPlaceholder = func(idx int) string { return "?" }
|
||||
case schemas.MSSQL:
|
||||
f.quoteObject = func(s string) string { return fmt.Sprintf("[%s]", s) }
|
||||
f.paramPlaceholder = func(idx int) string { return "?" }
|
||||
}
|
||||
return f, nil
|
||||
}
|
114
models/unittest/fixtures_test.go
Normal file
114
models/unittest/fixtures_test.go
Normal file
@ -0,0 +1,114 @@
|
||||
// Copyright 2024 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package unittest_test
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"code.gitea.io/gitea/models/unittest"
|
||||
user_model "code.gitea.io/gitea/models/user"
|
||||
"code.gitea.io/gitea/modules/test"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
var NewFixturesLoaderVendor = func(e *xorm.Engine, opts unittest.FixturesOptions) (unittest.FixturesLoader, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
/*
|
||||
// the old code is kept here in case we are still interested in benchmarking the two implementations
|
||||
func init() {
|
||||
NewFixturesLoaderVendor = func(e *xorm.Engine, opts unittest.FixturesOptions) (unittest.FixturesLoader, error) {
|
||||
return NewFixturesLoaderVendorGoTestfixtures(e, opts)
|
||||
}
|
||||
}
|
||||
|
||||
func NewFixturesLoaderVendorGoTestfixtures(e *xorm.Engine, opts unittest.FixturesOptions) (*testfixtures.Loader, error) {
|
||||
files, err := unittest.FixturesFileFullPaths(opts.Dir, opts.Files)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to get fixtures files: %w", err)
|
||||
}
|
||||
var dialect string
|
||||
switch e.Dialect().URI().DBType {
|
||||
case schemas.POSTGRES:
|
||||
dialect = "postgres"
|
||||
case schemas.MYSQL:
|
||||
dialect = "mysql"
|
||||
case schemas.MSSQL:
|
||||
dialect = "mssql"
|
||||
case schemas.SQLITE:
|
||||
dialect = "sqlite3"
|
||||
default:
|
||||
return nil, fmt.Errorf("unsupported RDBMS for integration tests: %q", e.Dialect().URI().DBType)
|
||||
}
|
||||
loaderOptions := []func(loader *testfixtures.Loader) error{
|
||||
testfixtures.Database(e.DB().DB),
|
||||
testfixtures.Dialect(dialect),
|
||||
testfixtures.DangerousSkipTestDatabaseCheck(),
|
||||
testfixtures.Files(files...),
|
||||
}
|
||||
if e.Dialect().URI().DBType == schemas.POSTGRES {
|
||||
loaderOptions = append(loaderOptions, testfixtures.SkipResetSequences())
|
||||
}
|
||||
return testfixtures.New(loaderOptions...)
|
||||
}
|
||||
*/
|
||||
|
||||
func prepareTestFixturesLoaders(t testing.TB) unittest.FixturesOptions {
|
||||
_ = user_model.User{}
|
||||
opts := unittest.FixturesOptions{Dir: filepath.Join(test.SetupGiteaRoot(), "models", "fixtures"), Files: []string{
|
||||
"user.yml",
|
||||
}}
|
||||
require.NoError(t, unittest.CreateTestEngine(opts))
|
||||
return opts
|
||||
}
|
||||
|
||||
func TestFixturesLoader(t *testing.T) {
|
||||
opts := prepareTestFixturesLoaders(t)
|
||||
loaderInternal, err := unittest.NewFixturesLoader(unittest.GetXORMEngine(), opts)
|
||||
require.NoError(t, err)
|
||||
loaderVendor, err := NewFixturesLoaderVendor(unittest.GetXORMEngine(), opts)
|
||||
require.NoError(t, err)
|
||||
t.Run("Internal", func(t *testing.T) {
|
||||
require.NoError(t, loaderInternal.Load())
|
||||
require.NoError(t, loaderInternal.Load())
|
||||
})
|
||||
t.Run("Vendor", func(t *testing.T) {
|
||||
if loaderVendor == nil {
|
||||
t.Skip()
|
||||
}
|
||||
require.NoError(t, loaderVendor.Load())
|
||||
require.NoError(t, loaderVendor.Load())
|
||||
})
|
||||
}
|
||||
|
||||
func BenchmarkFixturesLoader(b *testing.B) {
|
||||
opts := prepareTestFixturesLoaders(b)
|
||||
require.NoError(b, unittest.CreateTestEngine(opts))
|
||||
loaderInternal, err := unittest.NewFixturesLoader(unittest.GetXORMEngine(), opts)
|
||||
require.NoError(b, err)
|
||||
loaderVendor, err := NewFixturesLoaderVendor(unittest.GetXORMEngine(), opts)
|
||||
require.NoError(b, err)
|
||||
|
||||
// BenchmarkFixturesLoader/Vendor
|
||||
// BenchmarkFixturesLoader/Vendor-12 1696 719416 ns/op
|
||||
// BenchmarkFixturesLoader/Internal
|
||||
// BenchmarkFixturesLoader/Internal-12 1746 670457 ns/op
|
||||
b.Run("Internal", func(b *testing.B) {
|
||||
for i := 0; i < b.N; i++ {
|
||||
require.NoError(b, loaderInternal.Load())
|
||||
}
|
||||
})
|
||||
b.Run("Vendor", func(b *testing.B) {
|
||||
if loaderVendor == nil {
|
||||
b.Skip()
|
||||
}
|
||||
for i := 0; i < b.N; i++ {
|
||||
require.NoError(b, loaderVendor.Load())
|
||||
}
|
||||
})
|
||||
}
|
@ -4,7 +4,7 @@
|
||||
package unittest
|
||||
|
||||
import (
|
||||
"log"
|
||||
"fmt"
|
||||
"reflect"
|
||||
)
|
||||
|
||||
@ -14,7 +14,7 @@ func fieldByName(v reflect.Value, field string) reflect.Value {
|
||||
}
|
||||
f := v.FieldByName(field)
|
||||
if !f.IsValid() {
|
||||
log.Panicf("can not read %s for %v", field, v)
|
||||
panic(fmt.Errorf("can not read %s for %v", field, v))
|
||||
}
|
||||
return f
|
||||
}
|
||||
|
@ -28,16 +28,7 @@ import (
|
||||
"xorm.io/xorm/names"
|
||||
)
|
||||
|
||||
// giteaRoot a path to the gitea root
|
||||
var (
|
||||
giteaRoot string
|
||||
fixturesDir string
|
||||
)
|
||||
|
||||
// FixturesDir returns the fixture directory
|
||||
func FixturesDir() string {
|
||||
return fixturesDir
|
||||
}
|
||||
var giteaRoot string
|
||||
|
||||
func fatalTestError(fmtStr string, args ...any) {
|
||||
_, _ = fmt.Fprintf(os.Stderr, fmtStr, args...)
|
||||
@ -79,39 +70,14 @@ type TestOptions struct {
|
||||
|
||||
// MainTest a reusable TestMain(..) function for unit tests that need to use a
|
||||
// test database. Creates the test database, and sets necessary settings.
|
||||
func MainTest(m *testing.M, testOpts ...*TestOptions) {
|
||||
searchDir, _ := os.Getwd()
|
||||
for searchDir != "" {
|
||||
if _, err := os.Stat(filepath.Join(searchDir, "go.mod")); err == nil {
|
||||
break // The "go.mod" should be the one for Gitea repository
|
||||
}
|
||||
if dir := filepath.Dir(searchDir); dir == searchDir {
|
||||
searchDir = "" // reaches the root of filesystem
|
||||
} else {
|
||||
searchDir = dir
|
||||
}
|
||||
}
|
||||
if searchDir == "" {
|
||||
panic("The tests should run in a Gitea repository, there should be a 'go.mod' in the root")
|
||||
}
|
||||
|
||||
giteaRoot = searchDir
|
||||
func MainTest(m *testing.M, testOptsArg ...*TestOptions) {
|
||||
testOpts := util.OptionalArg(testOptsArg, &TestOptions{})
|
||||
giteaRoot = test.SetupGiteaRoot()
|
||||
setting.CustomPath = filepath.Join(giteaRoot, "custom")
|
||||
InitSettings()
|
||||
|
||||
fixturesDir = filepath.Join(giteaRoot, "models", "fixtures")
|
||||
var opts FixturesOptions
|
||||
if len(testOpts) == 0 || len(testOpts[0].FixtureFiles) == 0 {
|
||||
opts.Dir = fixturesDir
|
||||
} else {
|
||||
for _, f := range testOpts[0].FixtureFiles {
|
||||
if len(f) != 0 {
|
||||
opts.Files = append(opts.Files, filepath.Join(fixturesDir, f))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if err := CreateTestEngine(opts); err != nil {
|
||||
fixturesOpts := FixturesOptions{Dir: filepath.Join(giteaRoot, "models", "fixtures"), Files: testOpts.FixtureFiles}
|
||||
if err := CreateTestEngine(fixturesOpts); err != nil {
|
||||
fatalTestError("Error creating test engine: %v\n", err)
|
||||
}
|
||||
|
||||
@ -172,16 +138,16 @@ func MainTest(m *testing.M, testOpts ...*TestOptions) {
|
||||
fatalTestError("git.Init: %v\n", err)
|
||||
}
|
||||
|
||||
if len(testOpts) > 0 && testOpts[0].SetUp != nil {
|
||||
if err := testOpts[0].SetUp(); err != nil {
|
||||
if testOpts.SetUp != nil {
|
||||
if err := testOpts.SetUp(); err != nil {
|
||||
fatalTestError("set up failed: %v\n", err)
|
||||
}
|
||||
}
|
||||
|
||||
exitStatus := m.Run()
|
||||
|
||||
if len(testOpts) > 0 && testOpts[0].TearDown != nil {
|
||||
if err := testOpts[0].TearDown(); err != nil {
|
||||
if testOpts.TearDown != nil {
|
||||
if err := testOpts.TearDown(); err != nil {
|
||||
fatalTestError("tear down failed: %v\n", err)
|
||||
}
|
||||
}
|
||||
|
@ -4,13 +4,17 @@
|
||||
package unittest
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"code.gitea.io/gitea/models/db"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"xorm.io/builder"
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
// Code in this file is mainly used by unittest.CheckConsistencyFor, which is not in the unit test for various reasons.
|
||||
@ -51,22 +55,23 @@ func whereOrderConditions(e db.Engine, conditions []any) db.Engine {
|
||||
return e.OrderBy(orderBy)
|
||||
}
|
||||
|
||||
// LoadBeanIfExists loads beans from fixture database if exist
|
||||
func LoadBeanIfExists(bean any, conditions ...any) (bool, error) {
|
||||
func getBeanIfExists(bean any, conditions ...any) (bool, error) {
|
||||
e := db.GetEngine(db.DefaultContext)
|
||||
return whereOrderConditions(e, conditions).Get(bean)
|
||||
}
|
||||
|
||||
// BeanExists for testing, check if a bean exists
|
||||
func BeanExists(t assert.TestingT, bean any, conditions ...any) bool {
|
||||
exists, err := LoadBeanIfExists(bean, conditions...)
|
||||
assert.NoError(t, err)
|
||||
return exists
|
||||
func GetBean[T any](t require.TestingT, bean T, conditions ...any) (ret T) {
|
||||
exists, err := getBeanIfExists(bean, conditions...)
|
||||
require.NoError(t, err)
|
||||
if exists {
|
||||
return bean
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
// AssertExistsAndLoadBean assert that a bean exists and load it from the test database
|
||||
func AssertExistsAndLoadBean[T any](t require.TestingT, bean T, conditions ...any) T {
|
||||
exists, err := LoadBeanIfExists(bean, conditions...)
|
||||
exists, err := getBeanIfExists(bean, conditions...)
|
||||
require.NoError(t, err)
|
||||
require.True(t, exists,
|
||||
"Expected to find %+v (of type %T, with conditions %+v), but did not",
|
||||
@ -112,25 +117,11 @@ func GetCount(t assert.TestingT, bean any, conditions ...any) int {
|
||||
|
||||
// AssertNotExistsBean assert that a bean does not exist in the test database
|
||||
func AssertNotExistsBean(t assert.TestingT, bean any, conditions ...any) {
|
||||
exists, err := LoadBeanIfExists(bean, conditions...)
|
||||
exists, err := getBeanIfExists(bean, conditions...)
|
||||
assert.NoError(t, err)
|
||||
assert.False(t, exists)
|
||||
}
|
||||
|
||||
// AssertExistsIf asserts that a bean exists or does not exist, depending on
|
||||
// what is expected.
|
||||
func AssertExistsIf(t assert.TestingT, expected bool, bean any, conditions ...any) {
|
||||
exists, err := LoadBeanIfExists(bean, conditions...)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, expected, exists)
|
||||
}
|
||||
|
||||
// AssertSuccessfulInsert assert that beans is successfully inserted
|
||||
func AssertSuccessfulInsert(t assert.TestingT, beans ...any) {
|
||||
err := db.Insert(db.DefaultContext, beans...)
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
|
||||
// AssertCount assert the count of a bean
|
||||
func AssertCount(t assert.TestingT, bean, expected any) bool {
|
||||
return assert.EqualValues(t, expected, GetCount(t, bean))
|
||||
@ -155,3 +146,39 @@ func AssertCountByCond(t assert.TestingT, tableName string, cond builder.Cond, e
|
||||
return assert.EqualValues(t, expected, GetCountByCond(t, tableName, cond),
|
||||
"Failed consistency test, the counted bean (of table %s) was %+v", tableName, cond)
|
||||
}
|
||||
|
||||
// DumpQueryResult dumps the result of a query for debugging purpose
|
||||
func DumpQueryResult(t require.TestingT, sqlOrBean any, sqlArgs ...any) {
|
||||
x := db.GetEngine(db.DefaultContext).(*xorm.Engine)
|
||||
goDB := x.DB().DB
|
||||
sql, ok := sqlOrBean.(string)
|
||||
if !ok {
|
||||
sql = fmt.Sprintf("SELECT * FROM %s", db.TableName(sqlOrBean))
|
||||
} else if !strings.Contains(sql, " ") {
|
||||
sql = fmt.Sprintf("SELECT * FROM %s", sql)
|
||||
}
|
||||
rows, err := goDB.Query(sql, sqlArgs...)
|
||||
require.NoError(t, err)
|
||||
defer rows.Close()
|
||||
columns, err := rows.Columns()
|
||||
require.NoError(t, err)
|
||||
|
||||
_, _ = fmt.Fprintf(os.Stdout, "====== DumpQueryResult: %s ======\n", sql)
|
||||
idx := 0
|
||||
for rows.Next() {
|
||||
row := make([]any, len(columns))
|
||||
rowPointers := make([]any, len(columns))
|
||||
for i := range row {
|
||||
rowPointers[i] = &row[i]
|
||||
}
|
||||
require.NoError(t, rows.Scan(rowPointers...))
|
||||
_, _ = fmt.Fprintf(os.Stdout, "- # row[%d]\n", idx)
|
||||
for i, col := range columns {
|
||||
_, _ = fmt.Fprintf(os.Stdout, " %s: %v\n", col, row[i])
|
||||
}
|
||||
idx++
|
||||
}
|
||||
if idx == 0 {
|
||||
_, _ = fmt.Fprintf(os.Stdout, "(no result, columns: %s)\n", strings.Join(columns, ", "))
|
||||
}
|
||||
}
|
||||
|
@ -357,8 +357,8 @@ func VerifyActiveEmailCode(ctx context.Context, code, email string) *EmailAddres
|
||||
if user := GetVerifyUser(ctx, code); user != nil {
|
||||
// time limit code
|
||||
prefix := code[:base.TimeLimitCodeLength]
|
||||
data := fmt.Sprintf("%d%s%s%s%s", user.ID, email, user.LowerName, user.Passwd, user.Rands)
|
||||
|
||||
opts := &TimeLimitCodeOptions{Purpose: TimeLimitCodeActivateEmail, NewEmail: email}
|
||||
data := makeTimeLimitCodeHashData(opts, user)
|
||||
if base.VerifyTimeLimitCode(time.Now(), data, setting.Service.ActiveCodeLives, prefix) {
|
||||
emailAddress := &EmailAddress{UID: user.ID, Email: email}
|
||||
if has, _ := db.GetEngine(ctx).Get(emailAddress); has {
|
||||
@ -486,10 +486,10 @@ func ActivateUserEmail(ctx context.Context, userID int64, email string, activate
|
||||
|
||||
// Activate/deactivate a user's primary email address and account
|
||||
if addr.IsPrimary {
|
||||
user, exist, err := db.Get[User](ctx, builder.Eq{"id": userID, "email": email})
|
||||
user, exist, err := db.Get[User](ctx, builder.Eq{"id": userID})
|
||||
if err != nil {
|
||||
return err
|
||||
} else if !exist {
|
||||
} else if !exist || !strings.EqualFold(user.Email, email) {
|
||||
return fmt.Errorf("no user with ID: %d and Email: %s", userID, email)
|
||||
}
|
||||
|
||||
|
@ -39,8 +39,6 @@ type SearchUserOptions struct {
|
||||
IsTwoFactorEnabled optional.Option[bool]
|
||||
IsProhibitLogin optional.Option[bool]
|
||||
IncludeReserved bool
|
||||
|
||||
ExtraParamStrings map[string]string
|
||||
}
|
||||
|
||||
func (opts *SearchUserOptions) toSearchQueryBase(ctx context.Context) *xorm.Session {
|
||||
|
@ -181,7 +181,8 @@ func (u *User) BeforeUpdate() {
|
||||
u.MaxRepoCreation = -1
|
||||
}
|
||||
|
||||
// Organization does not need email
|
||||
// FIXME: this email doesn't need to be in lowercase, because the emails are mainly managed by the email table with lower_email field
|
||||
// This trick could be removed in new releases to display the user inputed email as-is.
|
||||
u.Email = strings.ToLower(u.Email)
|
||||
if !u.IsOrganization() {
|
||||
if len(u.AvatarEmail) == 0 {
|
||||
@ -310,17 +311,6 @@ func (u *User) OrganisationLink() string {
|
||||
return setting.AppSubURL + "/org/" + url.PathEscape(u.Name)
|
||||
}
|
||||
|
||||
// GenerateEmailActivateCode generates an activate code based on user information and given e-mail.
|
||||
func (u *User) GenerateEmailActivateCode(email string) string {
|
||||
code := base.CreateTimeLimitCode(
|
||||
fmt.Sprintf("%d%s%s%s%s", u.ID, email, u.LowerName, u.Passwd, u.Rands),
|
||||
setting.Service.ActiveCodeLives, time.Now(), nil)
|
||||
|
||||
// Add tail hex username
|
||||
code += hex.EncodeToString([]byte(u.LowerName))
|
||||
return code
|
||||
}
|
||||
|
||||
// GetUserFollowers returns range of user's followers.
|
||||
func GetUserFollowers(ctx context.Context, u, viewer *User, listOptions db.ListOptions) ([]*User, int64, error) {
|
||||
sess := db.GetEngine(ctx).
|
||||
@ -863,12 +853,38 @@ func GetVerifyUser(ctx context.Context, code string) (user *User) {
|
||||
return nil
|
||||
}
|
||||
|
||||
// VerifyUserActiveCode verifies active code when active account
|
||||
func VerifyUserActiveCode(ctx context.Context, code string) (user *User) {
|
||||
type TimeLimitCodePurpose string
|
||||
|
||||
const (
|
||||
TimeLimitCodeActivateAccount TimeLimitCodePurpose = "activate_account"
|
||||
TimeLimitCodeActivateEmail TimeLimitCodePurpose = "activate_email"
|
||||
TimeLimitCodeResetPassword TimeLimitCodePurpose = "reset_password"
|
||||
)
|
||||
|
||||
type TimeLimitCodeOptions struct {
|
||||
Purpose TimeLimitCodePurpose
|
||||
NewEmail string
|
||||
}
|
||||
|
||||
func makeTimeLimitCodeHashData(opts *TimeLimitCodeOptions, u *User) string {
|
||||
return fmt.Sprintf("%s|%d|%s|%s|%s|%s", opts.Purpose, u.ID, strings.ToLower(util.IfZero(opts.NewEmail, u.Email)), u.LowerName, u.Passwd, u.Rands)
|
||||
}
|
||||
|
||||
// GenerateUserTimeLimitCode generates a time-limit code based on user information and given e-mail.
|
||||
// TODO: need to use cache or db to store it to make sure a code can only be consumed once
|
||||
func GenerateUserTimeLimitCode(opts *TimeLimitCodeOptions, u *User) string {
|
||||
data := makeTimeLimitCodeHashData(opts, u)
|
||||
code := base.CreateTimeLimitCode(data, setting.Service.ActiveCodeLives, time.Now(), nil)
|
||||
code += hex.EncodeToString([]byte(u.LowerName)) // Add tail hex username
|
||||
return code
|
||||
}
|
||||
|
||||
// VerifyUserTimeLimitCode verifies the time-limit code
|
||||
func VerifyUserTimeLimitCode(ctx context.Context, opts *TimeLimitCodeOptions, code string) (user *User) {
|
||||
if user = GetVerifyUser(ctx, code); user != nil {
|
||||
// time limit code
|
||||
prefix := code[:base.TimeLimitCodeLength]
|
||||
data := fmt.Sprintf("%d%s%s%s%s", user.ID, user.Email, user.LowerName, user.Passwd, user.Rands)
|
||||
data := makeTimeLimitCodeHashData(opts, user)
|
||||
if base.VerifyTimeLimitCode(time.Now(), data, setting.Service.ActiveCodeLives, prefix) {
|
||||
return user
|
||||
}
|
||||
|
@ -62,3 +62,14 @@ func (repo *Repository) LsTree(ref string, filenames ...string) ([]string, error
|
||||
|
||||
return filelist, err
|
||||
}
|
||||
|
||||
// GetTreePathLatestCommitID returns the latest commit of a tree path
|
||||
func (repo *Repository) GetTreePathLatestCommit(refName, treePath string) (*Commit, error) {
|
||||
stdout, _, err := NewCommand(repo.Ctx, "rev-list", "-1").
|
||||
AddDynamicArguments(refName).AddDashesAndList(treePath).
|
||||
RunStdString(&RunOpts{Dir: repo.Path})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return repo.GetCommit(strings.TrimSpace(stdout))
|
||||
}
|
||||
|
@ -25,3 +25,18 @@ func TestSubTree_Issue29101(t *testing.T) {
|
||||
assert.True(t, IsErrNotExist(err))
|
||||
}
|
||||
}
|
||||
|
||||
func Test_GetTreePathLatestCommit(t *testing.T) {
|
||||
repo, err := openRepositoryWithDefaultContext(filepath.Join(testReposDir, "repo6_blame"))
|
||||
assert.NoError(t, err)
|
||||
defer repo.Close()
|
||||
|
||||
commitID, err := repo.GetBranchCommitID("master")
|
||||
assert.NoError(t, err)
|
||||
assert.EqualValues(t, "544d8f7a3b15927cddf2299b4b562d6ebd71b6a7", commitID)
|
||||
|
||||
commit, err := repo.GetTreePathLatestCommit("master", "blame.txt")
|
||||
assert.NoError(t, err)
|
||||
assert.NotNil(t, commit)
|
||||
assert.EqualValues(t, "45fb6cbc12f970b04eacd5cd4165edd11c8d7376", commit.ID.String())
|
||||
}
|
||||
|
@ -5,8 +5,6 @@ package setting
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
)
|
||||
|
||||
// CORSConfig defines CORS settings
|
||||
@ -28,7 +26,4 @@ var CORSConfig = struct {
|
||||
|
||||
func loadCorsFrom(rootCfg ConfigProvider) {
|
||||
mustMapSetting(rootCfg, "cors", &CORSConfig)
|
||||
if CORSConfig.Enabled {
|
||||
log.Info("CORS Service Enabled")
|
||||
}
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ func IndexerGlobFromString(globstr string) []*GlobMatcher {
|
||||
expr = strings.TrimSpace(expr)
|
||||
if expr != "" {
|
||||
if g, err := GlobMatcherCompile(expr, '.', '/'); err != nil {
|
||||
log.Info("Invalid glob expression '%s' (skipped): %v", expr, err)
|
||||
log.Warn("Invalid glob expression '%s' (skipped): %v", expr, err)
|
||||
} else {
|
||||
extarr = append(extarr, g)
|
||||
}
|
||||
|
@ -255,8 +255,6 @@ func loadMailerFrom(rootCfg ConfigProvider) {
|
||||
MailService.OverrideEnvelopeFrom = true
|
||||
MailService.EnvelopeFrom = parsed.Address
|
||||
}
|
||||
|
||||
log.Info("Mail Service Enabled")
|
||||
}
|
||||
|
||||
func loadRegisterMailFrom(rootCfg ConfigProvider) {
|
||||
@ -267,7 +265,6 @@ func loadRegisterMailFrom(rootCfg ConfigProvider) {
|
||||
return
|
||||
}
|
||||
Service.RegisterEmailConfirm = true
|
||||
log.Info("Register Mail Service Enabled")
|
||||
}
|
||||
|
||||
func loadNotifyMailFrom(rootCfg ConfigProvider) {
|
||||
@ -278,7 +275,6 @@ func loadNotifyMailFrom(rootCfg ConfigProvider) {
|
||||
return
|
||||
}
|
||||
Service.EnableNotifyMail = true
|
||||
log.Info("Notify Mail Service Enabled")
|
||||
}
|
||||
|
||||
func tryResolveAddr(addr string) []net.IPAddr {
|
||||
|
@ -73,6 +73,4 @@ func loadSessionFrom(rootCfg ConfigProvider) {
|
||||
SessionConfig.ProviderConfig = string(shadowConfig)
|
||||
SessionConfig.OriginalProvider = SessionConfig.Provider
|
||||
SessionConfig.Provider = "VirtualSession"
|
||||
|
||||
log.Info("Session Service Enabled")
|
||||
}
|
||||
|
@ -20,7 +20,6 @@ func loadTimeFrom(rootCfg ConfigProvider) {
|
||||
if err != nil {
|
||||
log.Fatal("Load time zone failed: %v", err)
|
||||
}
|
||||
log.Info("Default UI Location is %v", zone)
|
||||
}
|
||||
if DefaultUILocation == nil {
|
||||
DefaultUILocation = time.Local
|
||||
|
@ -63,6 +63,7 @@ var UI = struct {
|
||||
} `ini:"ui.admin"`
|
||||
User struct {
|
||||
RepoPagingNum int
|
||||
OrgPagingNum int
|
||||
} `ini:"ui.user"`
|
||||
Meta struct {
|
||||
Author string
|
||||
@ -127,8 +128,10 @@ var UI = struct {
|
||||
},
|
||||
User: struct {
|
||||
RepoPagingNum int
|
||||
OrgPagingNum int
|
||||
}{
|
||||
RepoPagingNum: 15,
|
||||
OrgPagingNum: 15,
|
||||
},
|
||||
Meta: struct {
|
||||
Author string
|
||||
|
@ -13,9 +13,7 @@ import (
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
unittest.MainTest(m, &unittest.TestOptions{
|
||||
FixtureFiles: []string{""}, // load nothing
|
||||
})
|
||||
unittest.MainTest(m, &unittest.TestOptions{FixtureFiles: []string{ /* load nothing */ }})
|
||||
}
|
||||
|
||||
type testItem1 struct {
|
||||
@ -36,8 +34,6 @@ func (*testItem2) Name() string {
|
||||
}
|
||||
|
||||
func TestAppStateDB(t *testing.T) {
|
||||
assert.NoError(t, unittest.PrepareTestDatabase())
|
||||
|
||||
as := &DBStore{}
|
||||
|
||||
item1 := new(testItem1)
|
||||
|
@ -4,18 +4,14 @@
|
||||
package web
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"code.gitea.io/gitea/modules/container"
|
||||
"code.gitea.io/gitea/modules/htmlutil"
|
||||
"code.gitea.io/gitea/modules/reqctx"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
"code.gitea.io/gitea/modules/util"
|
||||
"code.gitea.io/gitea/modules/web/middleware"
|
||||
|
||||
"gitea.com/go-chi/binding"
|
||||
@ -45,7 +41,7 @@ func GetForm(dataStore reqctx.RequestDataStore) any {
|
||||
|
||||
// Router defines a route based on chi's router
|
||||
type Router struct {
|
||||
chiRouter chi.Router
|
||||
chiRouter *chi.Mux
|
||||
curGroupPrefix string
|
||||
curMiddlewares []any
|
||||
}
|
||||
@ -97,16 +93,21 @@ func isNilOrFuncNil(v any) bool {
|
||||
return r.Kind() == reflect.Func && r.IsNil()
|
||||
}
|
||||
|
||||
func (r *Router) wrapMiddlewareAndHandler(h []any) ([]func(http.Handler) http.Handler, http.HandlerFunc) {
|
||||
handlerProviders := make([]func(http.Handler) http.Handler, 0, len(r.curMiddlewares)+len(h)+1)
|
||||
for _, m := range r.curMiddlewares {
|
||||
func wrapMiddlewareAndHandler(curMiddlewares, h []any) ([]func(http.Handler) http.Handler, http.HandlerFunc) {
|
||||
handlerProviders := make([]func(http.Handler) http.Handler, 0, len(curMiddlewares)+len(h)+1)
|
||||
for _, m := range curMiddlewares {
|
||||
if !isNilOrFuncNil(m) {
|
||||
handlerProviders = append(handlerProviders, toHandlerProvider(m))
|
||||
}
|
||||
}
|
||||
for _, m := range h {
|
||||
if len(h) == 0 {
|
||||
panic("no endpoint handler provided")
|
||||
}
|
||||
for i, m := range h {
|
||||
if !isNilOrFuncNil(m) {
|
||||
handlerProviders = append(handlerProviders, toHandlerProvider(m))
|
||||
} else if i == len(h)-1 {
|
||||
panic("endpoint handler can't be nil")
|
||||
}
|
||||
}
|
||||
middlewares := handlerProviders[:len(handlerProviders)-1]
|
||||
@ -121,7 +122,7 @@ func (r *Router) wrapMiddlewareAndHandler(h []any) ([]func(http.Handler) http.Ha
|
||||
// Methods adds the same handlers for multiple http "methods" (separated by ",").
|
||||
// If any method is invalid, the lower level router will panic.
|
||||
func (r *Router) Methods(methods, pattern string, h ...any) {
|
||||
middlewares, handlerFunc := r.wrapMiddlewareAndHandler(h)
|
||||
middlewares, handlerFunc := wrapMiddlewareAndHandler(r.curMiddlewares, h)
|
||||
fullPattern := r.getPattern(pattern)
|
||||
if strings.Contains(methods, ",") {
|
||||
methods := strings.Split(methods, ",")
|
||||
@ -141,7 +142,7 @@ func (r *Router) Mount(pattern string, subRouter *Router) {
|
||||
|
||||
// Any delegate requests for all methods
|
||||
func (r *Router) Any(pattern string, h ...any) {
|
||||
middlewares, handlerFunc := r.wrapMiddlewareAndHandler(h)
|
||||
middlewares, handlerFunc := wrapMiddlewareAndHandler(r.curMiddlewares, h)
|
||||
r.chiRouter.With(middlewares...).HandleFunc(r.getPattern(pattern), handlerFunc)
|
||||
}
|
||||
|
||||
@ -185,17 +186,6 @@ func (r *Router) NotFound(h http.HandlerFunc) {
|
||||
r.chiRouter.NotFound(h)
|
||||
}
|
||||
|
||||
type pathProcessorParam struct {
|
||||
name string
|
||||
captureGroup int
|
||||
}
|
||||
|
||||
type PathProcessor struct {
|
||||
methods container.Set[string]
|
||||
re *regexp.Regexp
|
||||
params []pathProcessorParam
|
||||
}
|
||||
|
||||
func (r *Router) normalizeRequestPath(resp http.ResponseWriter, req *http.Request, next http.Handler) {
|
||||
normalized := false
|
||||
normalizedPath := req.URL.EscapedPath()
|
||||
@ -253,121 +243,16 @@ func (r *Router) normalizeRequestPath(resp http.ResponseWriter, req *http.Reques
|
||||
next.ServeHTTP(resp, req)
|
||||
}
|
||||
|
||||
func (p *PathProcessor) ProcessRequestPath(chiCtx *chi.Context, path string) bool {
|
||||
if !p.methods.Contains(chiCtx.RouteMethod) {
|
||||
return false
|
||||
}
|
||||
if !strings.HasPrefix(path, "/") {
|
||||
path = "/" + path
|
||||
}
|
||||
pathMatches := p.re.FindStringSubmatchIndex(path) // Golang regexp match pairs [start, end, start, end, ...]
|
||||
if pathMatches == nil {
|
||||
return false
|
||||
}
|
||||
var paramMatches [][]int
|
||||
for i := 2; i < len(pathMatches); {
|
||||
paramMatches = append(paramMatches, []int{pathMatches[i], pathMatches[i+1]})
|
||||
pmIdx := len(paramMatches) - 1
|
||||
end := pathMatches[i+1]
|
||||
i += 2
|
||||
for ; i < len(pathMatches); i += 2 {
|
||||
if pathMatches[i] >= end {
|
||||
break
|
||||
}
|
||||
paramMatches[pmIdx] = append(paramMatches[pmIdx], pathMatches[i], pathMatches[i+1])
|
||||
}
|
||||
}
|
||||
for i, pm := range paramMatches {
|
||||
groupIdx := p.params[i].captureGroup * 2
|
||||
chiCtx.URLParams.Add(p.params[i].name, path[pm[groupIdx]:pm[groupIdx+1]])
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func NewPathProcessor(methods, pattern string) *PathProcessor {
|
||||
p := &PathProcessor{methods: make(container.Set[string])}
|
||||
for _, method := range strings.Split(methods, ",") {
|
||||
p.methods.Add(strings.TrimSpace(method))
|
||||
}
|
||||
re := []byte{'^'}
|
||||
lastEnd := 0
|
||||
for lastEnd < len(pattern) {
|
||||
start := strings.IndexByte(pattern[lastEnd:], '<')
|
||||
if start == -1 {
|
||||
re = append(re, pattern[lastEnd:]...)
|
||||
break
|
||||
}
|
||||
end := strings.IndexByte(pattern[lastEnd+start:], '>')
|
||||
if end == -1 {
|
||||
panic(fmt.Sprintf("invalid pattern: %s", pattern))
|
||||
}
|
||||
re = append(re, pattern[lastEnd:lastEnd+start]...)
|
||||
partName, partExp, _ := strings.Cut(pattern[lastEnd+start+1:lastEnd+start+end], ":")
|
||||
lastEnd += start + end + 1
|
||||
|
||||
// TODO: it could support to specify a "capture group" for the name, for example: "/<name[2]:(\d)-(\d)>"
|
||||
// it is not used so no need to implement it now
|
||||
param := pathProcessorParam{}
|
||||
if partExp == "*" {
|
||||
re = append(re, "(.*?)/?"...)
|
||||
if lastEnd < len(pattern) {
|
||||
if pattern[lastEnd] == '/' {
|
||||
lastEnd++
|
||||
}
|
||||
}
|
||||
} else {
|
||||
partExp = util.IfZero(partExp, "[^/]+")
|
||||
re = append(re, '(')
|
||||
re = append(re, partExp...)
|
||||
re = append(re, ')')
|
||||
}
|
||||
param.name = partName
|
||||
p.params = append(p.params, param)
|
||||
}
|
||||
re = append(re, '$')
|
||||
reStr := string(re)
|
||||
p.re = regexp.MustCompile(reStr)
|
||||
return p
|
||||
}
|
||||
|
||||
// Combo delegates requests to Combo
|
||||
func (r *Router) Combo(pattern string, h ...any) *Combo {
|
||||
return &Combo{r, pattern, h}
|
||||
}
|
||||
|
||||
// Combo represents a tiny group routes with same pattern
|
||||
type Combo struct {
|
||||
r *Router
|
||||
pattern string
|
||||
h []any
|
||||
}
|
||||
|
||||
// Get delegates Get method
|
||||
func (c *Combo) Get(h ...any) *Combo {
|
||||
c.r.Get(c.pattern, append(c.h, h...)...)
|
||||
return c
|
||||
}
|
||||
|
||||
// Post delegates Post method
|
||||
func (c *Combo) Post(h ...any) *Combo {
|
||||
c.r.Post(c.pattern, append(c.h, h...)...)
|
||||
return c
|
||||
}
|
||||
|
||||
// Delete delegates Delete method
|
||||
func (c *Combo) Delete(h ...any) *Combo {
|
||||
c.r.Delete(c.pattern, append(c.h, h...)...)
|
||||
return c
|
||||
}
|
||||
|
||||
// Put delegates Put method
|
||||
func (c *Combo) Put(h ...any) *Combo {
|
||||
c.r.Put(c.pattern, append(c.h, h...)...)
|
||||
return c
|
||||
}
|
||||
|
||||
// Patch delegates Patch method
|
||||
func (c *Combo) Patch(h ...any) *Combo {
|
||||
c.r.Patch(c.pattern, append(c.h, h...)...)
|
||||
return c
|
||||
// PathGroup creates a group of paths which could be matched by regexp.
|
||||
// It is only designed to resolve some special cases which chi router can't handle.
|
||||
// For most cases, it shouldn't be used because it needs to iterate all rules to find the matched one (inefficient).
|
||||
func (r *Router) PathGroup(pattern string, fn func(g *RouterPathGroup), h ...any) {
|
||||
g := &RouterPathGroup{r: r, pathParam: "*"}
|
||||
fn(g)
|
||||
r.Any(pattern, append(h, g.ServeHTTP)...)
|
||||
}
|
41
modules/web/router_combo.go
Normal file
41
modules/web/router_combo.go
Normal file
@ -0,0 +1,41 @@
|
||||
// Copyright 2024 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package web
|
||||
|
||||
// Combo represents a tiny group routes with same pattern
|
||||
type Combo struct {
|
||||
r *Router
|
||||
pattern string
|
||||
h []any
|
||||
}
|
||||
|
||||
// Get delegates Get method
|
||||
func (c *Combo) Get(h ...any) *Combo {
|
||||
c.r.Get(c.pattern, append(c.h, h...)...)
|
||||
return c
|
||||
}
|
||||
|
||||
// Post delegates Post method
|
||||
func (c *Combo) Post(h ...any) *Combo {
|
||||
c.r.Post(c.pattern, append(c.h, h...)...)
|
||||
return c
|
||||
}
|
||||
|
||||
// Delete delegates Delete method
|
||||
func (c *Combo) Delete(h ...any) *Combo {
|
||||
c.r.Delete(c.pattern, append(c.h, h...)...)
|
||||
return c
|
||||
}
|
||||
|
||||
// Put delegates Put method
|
||||
func (c *Combo) Put(h ...any) *Combo {
|
||||
c.r.Put(c.pattern, append(c.h, h...)...)
|
||||
return c
|
||||
}
|
||||
|
||||
// Patch delegates Patch method
|
||||
func (c *Combo) Patch(h ...any) *Combo {
|
||||
c.r.Patch(c.pattern, append(c.h, h...)...)
|
||||
return c
|
||||
}
|
135
modules/web/router_path.go
Normal file
135
modules/web/router_path.go
Normal file
@ -0,0 +1,135 @@
|
||||
// Copyright 2024 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package web
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"code.gitea.io/gitea/modules/container"
|
||||
"code.gitea.io/gitea/modules/util"
|
||||
|
||||
"github.com/go-chi/chi/v5"
|
||||
)
|
||||
|
||||
type RouterPathGroup struct {
|
||||
r *Router
|
||||
pathParam string
|
||||
matchers []*routerPathMatcher
|
||||
}
|
||||
|
||||
func (g *RouterPathGroup) ServeHTTP(resp http.ResponseWriter, req *http.Request) {
|
||||
chiCtx := chi.RouteContext(req.Context())
|
||||
path := chiCtx.URLParam(g.pathParam)
|
||||
for _, m := range g.matchers {
|
||||
if m.matchPath(chiCtx, path) {
|
||||
handler := m.handlerFunc
|
||||
for i := len(m.middlewares) - 1; i >= 0; i-- {
|
||||
handler = m.middlewares[i](handler).ServeHTTP
|
||||
}
|
||||
handler(resp, req)
|
||||
return
|
||||
}
|
||||
}
|
||||
g.r.chiRouter.NotFoundHandler().ServeHTTP(resp, req)
|
||||
}
|
||||
|
||||
// MatchPath matches the request method, and uses regexp to match the path.
|
||||
// The pattern uses "<...>" to define path parameters, for example: "/<name>" (different from chi router)
|
||||
// It is only designed to resolve some special cases which chi router can't handle.
|
||||
// For most cases, it shouldn't be used because it needs to iterate all rules to find the matched one (inefficient).
|
||||
func (g *RouterPathGroup) MatchPath(methods, pattern string, h ...any) {
|
||||
g.matchers = append(g.matchers, newRouterPathMatcher(methods, pattern, h...))
|
||||
}
|
||||
|
||||
type routerPathParam struct {
|
||||
name string
|
||||
captureGroup int
|
||||
}
|
||||
|
||||
type routerPathMatcher struct {
|
||||
methods container.Set[string]
|
||||
re *regexp.Regexp
|
||||
params []routerPathParam
|
||||
middlewares []func(http.Handler) http.Handler
|
||||
handlerFunc http.HandlerFunc
|
||||
}
|
||||
|
||||
func (p *routerPathMatcher) matchPath(chiCtx *chi.Context, path string) bool {
|
||||
if !p.methods.Contains(chiCtx.RouteMethod) {
|
||||
return false
|
||||
}
|
||||
if !strings.HasPrefix(path, "/") {
|
||||
path = "/" + path
|
||||
}
|
||||
pathMatches := p.re.FindStringSubmatchIndex(path) // Golang regexp match pairs [start, end, start, end, ...]
|
||||
if pathMatches == nil {
|
||||
return false
|
||||
}
|
||||
var paramMatches [][]int
|
||||
for i := 2; i < len(pathMatches); {
|
||||
paramMatches = append(paramMatches, []int{pathMatches[i], pathMatches[i+1]})
|
||||
pmIdx := len(paramMatches) - 1
|
||||
end := pathMatches[i+1]
|
||||
i += 2
|
||||
for ; i < len(pathMatches); i += 2 {
|
||||
if pathMatches[i] >= end {
|
||||
break
|
||||
}
|
||||
paramMatches[pmIdx] = append(paramMatches[pmIdx], pathMatches[i], pathMatches[i+1])
|
||||
}
|
||||
}
|
||||
for i, pm := range paramMatches {
|
||||
groupIdx := p.params[i].captureGroup * 2
|
||||
chiCtx.URLParams.Add(p.params[i].name, path[pm[groupIdx]:pm[groupIdx+1]])
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func newRouterPathMatcher(methods, pattern string, h ...any) *routerPathMatcher {
|
||||
middlewares, handlerFunc := wrapMiddlewareAndHandler(nil, h)
|
||||
p := &routerPathMatcher{methods: make(container.Set[string]), middlewares: middlewares, handlerFunc: handlerFunc}
|
||||
for _, method := range strings.Split(methods, ",") {
|
||||
p.methods.Add(strings.TrimSpace(method))
|
||||
}
|
||||
re := []byte{'^'}
|
||||
lastEnd := 0
|
||||
for lastEnd < len(pattern) {
|
||||
start := strings.IndexByte(pattern[lastEnd:], '<')
|
||||
if start == -1 {
|
||||
re = append(re, pattern[lastEnd:]...)
|
||||
break
|
||||
}
|
||||
end := strings.IndexByte(pattern[lastEnd+start:], '>')
|
||||
if end == -1 {
|
||||
panic(fmt.Sprintf("invalid pattern: %s", pattern))
|
||||
}
|
||||
re = append(re, pattern[lastEnd:lastEnd+start]...)
|
||||
partName, partExp, _ := strings.Cut(pattern[lastEnd+start+1:lastEnd+start+end], ":")
|
||||
lastEnd += start + end + 1
|
||||
|
||||
// TODO: it could support to specify a "capture group" for the name, for example: "/<name[2]:(\d)-(\d)>"
|
||||
// it is not used so no need to implement it now
|
||||
param := routerPathParam{}
|
||||
if partExp == "*" {
|
||||
re = append(re, "(.*?)/?"...)
|
||||
if lastEnd < len(pattern) && pattern[lastEnd] == '/' {
|
||||
lastEnd++ // the "*" pattern is able to handle the last slash, so skip it
|
||||
}
|
||||
} else {
|
||||
partExp = util.IfZero(partExp, "[^/]+")
|
||||
re = append(re, '(')
|
||||
re = append(re, partExp...)
|
||||
re = append(re, ')')
|
||||
}
|
||||
param.name = partName
|
||||
p.params = append(p.params, param)
|
||||
}
|
||||
re = append(re, '$')
|
||||
reStr := string(re)
|
||||
p.re = regexp.MustCompile(reStr)
|
||||
return p
|
||||
}
|
@ -27,17 +27,21 @@ func chiURLParamsToMap(chiCtx *chi.Context) map[string]string {
|
||||
}
|
||||
m[key] = pathParams.Values[i]
|
||||
}
|
||||
return m
|
||||
return util.Iif(len(m) == 0, nil, m)
|
||||
}
|
||||
|
||||
func TestPathProcessor(t *testing.T) {
|
||||
testProcess := func(pattern, uri string, expectedPathParams map[string]string) {
|
||||
chiCtx := chi.NewRouteContext()
|
||||
chiCtx.RouteMethod = "GET"
|
||||
p := NewPathProcessor("GET", pattern)
|
||||
assert.True(t, p.ProcessRequestPath(chiCtx, uri), "use pattern %s to process uri %s", pattern, uri)
|
||||
p := newRouterPathMatcher("GET", pattern, http.NotFound)
|
||||
assert.True(t, p.matchPath(chiCtx, uri), "use pattern %s to process uri %s", pattern, uri)
|
||||
assert.Equal(t, expectedPathParams, chiURLParamsToMap(chiCtx), "use pattern %s to process uri %s", pattern, uri)
|
||||
}
|
||||
|
||||
// the "<...>" is intentionally designed to distinguish from chi's path parameters, because:
|
||||
// 1. their behaviors are totally different, we do not want to mislead developers
|
||||
// 2. we can write regexp in "<name:\w{3,4}>" easily and parse it easily
|
||||
testProcess("/<p1>/<p2>", "/a/b", map[string]string{"p1": "a", "p2": "b"})
|
||||
testProcess("/<p1:*>", "", map[string]string{"p1": ""}) // this is a special case, because chi router could use empty path
|
||||
testProcess("/<p1:*>", "/", map[string]string{"p1": ""})
|
||||
@ -67,24 +71,31 @@ func TestRouter(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
stopMark := func(optMark ...string) func(resp http.ResponseWriter, req *http.Request) {
|
||||
mark := util.OptionalArg(optMark, "")
|
||||
return func(resp http.ResponseWriter, req *http.Request) {
|
||||
if stop := req.FormValue("stop"); stop != "" && (mark == "" || mark == stop) {
|
||||
h(stop)(resp, req)
|
||||
resp.WriteHeader(http.StatusOK)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
r := NewRouter()
|
||||
r.NotFound(h("not-found:/"))
|
||||
r.Get("/{username}/{reponame}/{type:issues|pulls}", h("list-issues-a")) // this one will never be called
|
||||
r.Group("/{username}/{reponame}", func() {
|
||||
r.Get("/{type:issues|pulls}", h("list-issues-b"))
|
||||
r.Group("", func() {
|
||||
r.Get("/{type:issues|pulls}/{index}", h("view-issue"))
|
||||
}, func(resp http.ResponseWriter, req *http.Request) {
|
||||
if stop := req.FormValue("stop"); stop != "" {
|
||||
h(stop)(resp, req)
|
||||
resp.WriteHeader(http.StatusOK)
|
||||
}
|
||||
})
|
||||
}, stopMark())
|
||||
r.Group("/issues/{index}", func() {
|
||||
r.Post("/update", h("update-issue"))
|
||||
})
|
||||
})
|
||||
|
||||
m := NewRouter()
|
||||
m.NotFound(h("not-found:/api/v1"))
|
||||
r.Mount("/api/v1", m)
|
||||
m.Group("/repos", func() {
|
||||
m.Group("/{username}/{reponame}", func() {
|
||||
@ -96,11 +107,14 @@ func TestRouter(t *testing.T) {
|
||||
m.Patch("", h())
|
||||
m.Delete("", h())
|
||||
})
|
||||
m.PathGroup("/*", func(g *RouterPathGroup) {
|
||||
g.MatchPath("GET", `/<dir:*>/<file:[a-z]{1,2}>`, stopMark("s2"), h("match-path"))
|
||||
}, stopMark("s1"))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
testRoute := func(methodPath string, expected resultStruct) {
|
||||
testRoute := func(t *testing.T, methodPath string, expected resultStruct) {
|
||||
t.Run(methodPath, func(t *testing.T) {
|
||||
res = resultStruct{}
|
||||
methodPathFields := strings.Fields(methodPath)
|
||||
@ -111,24 +125,24 @@ func TestRouter(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
t.Run("Root Router", func(t *testing.T) {
|
||||
testRoute("GET /the-user/the-repo/other", resultStruct{})
|
||||
testRoute("GET /the-user/the-repo/pulls", resultStruct{
|
||||
t.Run("RootRouter", func(t *testing.T) {
|
||||
testRoute(t, "GET /the-user/the-repo/other", resultStruct{method: "GET", handlerMark: "not-found:/"})
|
||||
testRoute(t, "GET /the-user/the-repo/pulls", resultStruct{
|
||||
method: "GET",
|
||||
pathParams: map[string]string{"username": "the-user", "reponame": "the-repo", "type": "pulls"},
|
||||
handlerMark: "list-issues-b",
|
||||
})
|
||||
testRoute("GET /the-user/the-repo/issues/123", resultStruct{
|
||||
testRoute(t, "GET /the-user/the-repo/issues/123", resultStruct{
|
||||
method: "GET",
|
||||
pathParams: map[string]string{"username": "the-user", "reponame": "the-repo", "type": "issues", "index": "123"},
|
||||
handlerMark: "view-issue",
|
||||
})
|
||||
testRoute("GET /the-user/the-repo/issues/123?stop=hijack", resultStruct{
|
||||
testRoute(t, "GET /the-user/the-repo/issues/123?stop=hijack", resultStruct{
|
||||
method: "GET",
|
||||
pathParams: map[string]string{"username": "the-user", "reponame": "the-repo", "type": "issues", "index": "123"},
|
||||
handlerMark: "hijack",
|
||||
})
|
||||
testRoute("POST /the-user/the-repo/issues/123/update", resultStruct{
|
||||
testRoute(t, "POST /the-user/the-repo/issues/123/update", resultStruct{
|
||||
method: "POST",
|
||||
pathParams: map[string]string{"username": "the-user", "reponame": "the-repo", "index": "123"},
|
||||
handlerMark: "update-issue",
|
||||
@ -136,31 +150,57 @@ func TestRouter(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("Sub Router", func(t *testing.T) {
|
||||
testRoute("GET /api/v1/repos/the-user/the-repo/branches", resultStruct{
|
||||
testRoute(t, "GET /api/v1/other", resultStruct{method: "GET", handlerMark: "not-found:/api/v1"})
|
||||
testRoute(t, "GET /api/v1/repos/the-user/the-repo/branches", resultStruct{
|
||||
method: "GET",
|
||||
pathParams: map[string]string{"username": "the-user", "reponame": "the-repo"},
|
||||
})
|
||||
|
||||
testRoute("POST /api/v1/repos/the-user/the-repo/branches", resultStruct{
|
||||
testRoute(t, "POST /api/v1/repos/the-user/the-repo/branches", resultStruct{
|
||||
method: "POST",
|
||||
pathParams: map[string]string{"username": "the-user", "reponame": "the-repo"},
|
||||
})
|
||||
|
||||
testRoute("GET /api/v1/repos/the-user/the-repo/branches/master", resultStruct{
|
||||
testRoute(t, "GET /api/v1/repos/the-user/the-repo/branches/master", resultStruct{
|
||||
method: "GET",
|
||||
pathParams: map[string]string{"username": "the-user", "reponame": "the-repo", "name": "master"},
|
||||
})
|
||||
|
||||
testRoute("PATCH /api/v1/repos/the-user/the-repo/branches/master", resultStruct{
|
||||
testRoute(t, "PATCH /api/v1/repos/the-user/the-repo/branches/master", resultStruct{
|
||||
method: "PATCH",
|
||||
pathParams: map[string]string{"username": "the-user", "reponame": "the-repo", "name": "master"},
|
||||
})
|
||||
|
||||
testRoute("DELETE /api/v1/repos/the-user/the-repo/branches/master", resultStruct{
|
||||
testRoute(t, "DELETE /api/v1/repos/the-user/the-repo/branches/master", resultStruct{
|
||||
method: "DELETE",
|
||||
pathParams: map[string]string{"username": "the-user", "reponame": "the-repo", "name": "master"},
|
||||
})
|
||||
})
|
||||
|
||||
t.Run("MatchPath", func(t *testing.T) {
|
||||
testRoute(t, "GET /api/v1/repos/the-user/the-repo/branches/d1/d2/fn", resultStruct{
|
||||
method: "GET",
|
||||
pathParams: map[string]string{"username": "the-user", "reponame": "the-repo", "*": "d1/d2/fn", "dir": "d1/d2", "file": "fn"},
|
||||
handlerMark: "match-path",
|
||||
})
|
||||
testRoute(t, "GET /api/v1/repos/the-user/the-repo/branches/d1/d2/000", resultStruct{
|
||||
method: "GET",
|
||||
pathParams: map[string]string{"reponame": "the-repo", "username": "the-user", "*": "d1/d2/000"},
|
||||
handlerMark: "not-found:/api/v1",
|
||||
})
|
||||
|
||||
testRoute(t, "GET /api/v1/repos/the-user/the-repo/branches/d1/d2/fn?stop=s1", resultStruct{
|
||||
method: "GET",
|
||||
pathParams: map[string]string{"username": "the-user", "reponame": "the-repo", "*": "d1/d2/fn"},
|
||||
handlerMark: "s1",
|
||||
})
|
||||
|
||||
testRoute(t, "GET /api/v1/repos/the-user/the-repo/branches/d1/d2/fn?stop=s2", resultStruct{
|
||||
method: "GET",
|
||||
pathParams: map[string]string{"username": "the-user", "reponame": "the-repo", "*": "d1/d2/fn", "dir": "d1/d2", "file": "fn"},
|
||||
handlerMark: "s2",
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
func TestRouteNormalizePath(t *testing.T) {
|
@ -647,6 +647,7 @@ joined_on=Přidal/a se %s
|
||||
repositories=Repozitáře
|
||||
activity=Veřejná aktivita
|
||||
followers=Sledující
|
||||
show_more=Zobrazit více
|
||||
starred=Oblíbené repozitáře
|
||||
watched=Sledované repozitáře
|
||||
code=Kód
|
||||
|
@ -93,6 +93,7 @@ remove_all=Alle entfernen
|
||||
remove_label_str=Element "%s " entfernen
|
||||
edit=Bearbeiten
|
||||
view=Anzeigen
|
||||
test=Test
|
||||
|
||||
enabled=Aktiviert
|
||||
disabled=Deaktiviert
|
||||
@ -103,6 +104,7 @@ copy_url=URL kopieren
|
||||
copy_hash=Hash kopieren
|
||||
copy_content=Inhalt kopieren
|
||||
copy_branch=Branchnamen kopieren
|
||||
copy_path=Pfad kopieren
|
||||
copy_success=Kopiert!
|
||||
copy_error=Kopieren fehlgeschlagen
|
||||
copy_type_unsupported=Dieser Dateityp kann nicht kopiert werden
|
||||
@ -143,6 +145,7 @@ confirm_delete_selected=Alle ausgewählten Elemente löschen?
|
||||
|
||||
name=Name
|
||||
value=Wert
|
||||
readme=Readme
|
||||
|
||||
filter=Filter
|
||||
filter.clear=Filter leeren
|
||||
@ -158,12 +161,15 @@ filter.public=Öffentlich
|
||||
filter.private=Privat
|
||||
|
||||
no_results_found=Es wurden keine Ergebnisse gefunden.
|
||||
internal_error_skipped=Ein interner Fehler ist aufgetreten, wurde aber übersprungen: %s
|
||||
|
||||
[search]
|
||||
search=Suche ...
|
||||
type_tooltip=Suchmodus
|
||||
fuzzy=Ähnlich
|
||||
fuzzy_tooltip=Ergebnisse einbeziehen, die dem Suchbegriff ähnlich sind
|
||||
exact=Exakt
|
||||
exact_tooltip=Nur Suchbegriffe einbeziehen, die dem exakten Suchbegriff entsprechen
|
||||
repo_kind=Repositories durchsuchen ...
|
||||
user_kind=Benutzer durchsuchen ...
|
||||
org_kind=Organisationen durchsuchen ...
|
||||
@ -174,9 +180,13 @@ code_search_by_git_grep=Aktuelle Code-Suchergebnisse werden von "git grep" berei
|
||||
package_kind=Pakete durchsuchen ...
|
||||
project_kind=Projekte durchsuchen ...
|
||||
branch_kind=Branches durchsuchen ...
|
||||
tag_kind=Tags durchsuchen...
|
||||
tag_tooltip=Suche nach passenden Tags. Benutze '%', um jede Sequenz von Zahlen zu treffen.
|
||||
commit_kind=Commits durchsuchen ...
|
||||
runner_kind=Runner durchsuchen ...
|
||||
no_results=Es wurden keine passenden Ergebnisse gefunden.
|
||||
issue_kind=Issues durchsuchen ...
|
||||
pull_kind=Pull-Requests durchsuchen...
|
||||
keyword_search_unavailable=Zurzeit ist die Stichwort-Suche nicht verfügbar. Bitte wende dich an den Website-Administrator.
|
||||
|
||||
[aria]
|
||||
@ -201,7 +211,10 @@ buttons.link.tooltip=Link hinzufügen
|
||||
buttons.list.unordered.tooltip=Liste hinzufügen
|
||||
buttons.list.ordered.tooltip=Nummerierte Liste hinzufügen
|
||||
buttons.list.task.tooltip=Aufgabenliste hinzufügen
|
||||
buttons.table.add.tooltip=Tabelle hinzufügen
|
||||
buttons.table.add.insert=Hinzufügen
|
||||
buttons.table.rows=Zeilen
|
||||
buttons.table.cols=Spalten
|
||||
buttons.mention.tooltip=Benutzer oder Team erwähnen
|
||||
buttons.ref.tooltip=Issue oder Pull-Request referenzieren
|
||||
buttons.switch_to_legacy.tooltip=Legacy-Editor verwenden
|
||||
@ -214,16 +227,20 @@ string.desc=Z–A
|
||||
|
||||
[error]
|
||||
occurred=Ein Fehler ist aufgetreten
|
||||
report_message=Wenn du glaubst, dass dies ein Fehler von Gitea ist, suche bitte auf <a href="%s" target="_blank">GitHub</a> nach diesem Fehler und erstelle gegebenenfalls einen neuen Bugreport.
|
||||
not_found=Das Ziel konnte nicht gefunden werden.
|
||||
network_error=Netzwerkfehler
|
||||
|
||||
[startpage]
|
||||
app_desc=Ein einfacher, selbst gehosteter Git-Service
|
||||
install=Einfach zu installieren
|
||||
install_desc=Starte einfach <a target="_blank" rel="noopener noreferrer" href="%[1]s">die Anwendung</a> für deine Plattform oder nutze <a target="_blank" rel="noopener noreferrer" href="%[2]s">Docker</a>. Es existieren auch <a target="_blank" rel="noopener noreferrer" href="%[3]s">paketierte Versionen</a>.
|
||||
platform=Plattformübergreifend
|
||||
platform_desc=Gitea läuft überall, wo <a target="_blank" rel="noopener noreferrer" href="%s">Go</a> kompiliert: Windows, macOS, Linux, ARM, etc. Wähle das System, das dir am meisten gefällt!
|
||||
lightweight=Leichtgewicht
|
||||
lightweight_desc=Gitea hat minimale Systemanforderungen und kann selbst auf einem günstigen und stromsparenden Raspberry Pi betrieben werden!
|
||||
license=Quelloffen
|
||||
license_desc=Hol dir den Code unter <a target="_blank" rel="noopener noreferrer" href="%[1]s">%[2]s</a>! Leiste deinen <a target="_blank" rel="noopener noreferrer" href="%[3]s">Beitrag</a> bei der Verbesserung dieses Projekts. Trau dich!
|
||||
|
||||
[install]
|
||||
install=Installation
|
||||
@ -337,6 +354,7 @@ enable_update_checker=Aktualisierungsprüfung aktivieren
|
||||
enable_update_checker_helper=Stellt regelmäßig eine Verbindung zu gitea.io her, um nach neuen Versionen zu prüfen.
|
||||
env_config_keys=Umgebungskonfiguration
|
||||
env_config_keys_prompt=Die folgenden Umgebungsvariablen werden auch auf Ihre Konfigurationsdatei angewendet:
|
||||
config_write_file_prompt=Diese Konfigurationsoptionen werden in %s geschrieben
|
||||
|
||||
[home]
|
||||
nav_menu=Navigationsmenü
|
||||
@ -377,6 +395,8 @@ relevant_repositories=Es werden nur relevante Repositories angezeigt, <a href="%
|
||||
|
||||
[auth]
|
||||
create_new_account=Konto anlegen
|
||||
already_have_account=Du hast bereits ein Konto?
|
||||
sign_in_now=Jetzt anmelden!
|
||||
disable_register_prompt=Die Registrierung ist deaktiviert. Bitte wende dich an den Administrator.
|
||||
disable_register_mail=E-Mail-Bestätigung bei der Registrierung ist deaktiviert.
|
||||
manual_activation_only=Kontaktiere den Website-Administrator, um die Aktivierung abzuschließen.
|
||||
@ -384,6 +404,8 @@ remember_me=Dieses Gerät speichern
|
||||
remember_me.compromised=Das Login-Token ist nicht mehr gültig, was auf ein kompromittiertes Konto hindeuten kann. Bitte überprüfe dein Konto auf ungewöhnliche Aktivitäten.
|
||||
forgot_password_title=Passwort vergessen
|
||||
forgot_password=Passwort vergessen?
|
||||
need_account=Noch kein Konto?
|
||||
sign_up_now=Jetzt registrieren.
|
||||
sign_up_successful=Konto wurde erfolgreich erstellt. Willkommen!
|
||||
confirmation_mail_sent_prompt_ex=Eine neue Bestätigungs-E-Mail wurde an <b>%s</b>gesendet. Bitte überprüfe deinen Posteingang innerhalb der nächsten %s, um den Registrierungsprozess abzuschließen. Wenn deine Registrierungs-E-Mail-Adresse falsch ist, kannst du dich erneut anmelden und diese ändern.
|
||||
must_change_password=Aktualisiere dein Passwort
|
||||
@ -424,6 +446,7 @@ oauth_signin_submit=Konto verbinden
|
||||
oauth.signin.error=Beim Verarbeiten der Autorisierungsanfrage ist ein Fehler aufgetreten. Wenn dieser Fehler weiterhin besteht, wende dich bitte an deinen Administrator.
|
||||
oauth.signin.error.access_denied=Die Autorisierungsanfrage wurde abgelehnt.
|
||||
oauth.signin.error.temporarily_unavailable=Autorisierung fehlgeschlagen, da der Authentifizierungsserver vorübergehend nicht verfügbar ist. Bitte versuch es später erneut.
|
||||
oauth_callback_unable_auto_reg=Automatische Registrierung ist aktiviert, aber der OAuth2-Provider %[1]s hat fehlende Felder zurückgegeben: %[2]s, kann den Account nicht automatisch erstellen. Bitte erstelle oder verbinde einen Account oder kontaktieren den Administrator.
|
||||
openid_connect_submit=Verbinden
|
||||
openid_connect_title=Mit bestehendem Konto verbinden
|
||||
openid_connect_desc=Die gewählte OpenID-URI ist unbekannt. Ordne sie hier einem neuen Account zu.
|
||||
@ -437,12 +460,16 @@ authorize_application=Anwendung autorisieren
|
||||
authorize_redirect_notice=Du wirst zu %s weitergeleitet, wenn du diese Anwendung autorisierst.
|
||||
authorize_application_created_by=Diese Anwendung wurde von %s erstellt.
|
||||
authorize_application_description=Wenn du diese Anwendung autorisierst, wird sie die Berechtigung erhalten, alle Informationen zu deinem Account zu bearbeiten oder zu lesen. Dies beinhaltet auch private Repositories und Organisationen.
|
||||
authorize_application_with_scopes=Mit Bereichen: %s
|
||||
authorize_title=`"%s" den Zugriff auf deinen Account gestatten?`
|
||||
authorization_failed=Autorisierung fehlgeschlagen
|
||||
authorization_failed_desc=Die Autorisierung ist fehlgeschlagen, da wir eine ungültige Anfrage erkannt haben. Bitte kontaktiere den Betreuer der App, die du zu autorisieren versucht hast.
|
||||
sspi_auth_failed=SSPI-Authentifizierung fehlgeschlagen
|
||||
password_pwned=Das von dir gewählte Passwort befindet sich auf einer <a target="_blank" rel="noopener noreferrer" href="%s">Liste gestohlener Passwörter</a>, die öffentlich verfügbar sind. Bitte versuche es erneut mit einem anderen Passwort und ziehe in Erwägung, auch anderswo deine Passwörter zu ändern.
|
||||
password_pwned_err=Anfrage an HaveIBeenPwned konnte nicht abgeschlossen werden
|
||||
last_admin=Du kannst den letzten Admin nicht entfernen. Es muss mindestens einen Administrator geben.
|
||||
signin_passkey=Mit einem Passkey anmelden
|
||||
back_to_sign_in=Zurück zum Anmelden
|
||||
|
||||
[mail]
|
||||
view_it_on=Auf %s ansehen
|
||||
@ -459,6 +486,7 @@ activate_email=Bestätige deine E-Mail-Adresse
|
||||
activate_email.title=%s, bitte verifiziere deine E-Mail-Adresse
|
||||
activate_email.text=Bitte klicke innerhalb von <b>%s</b> auf folgenden Link, um dein Konto zu aktivieren:
|
||||
|
||||
register_notify=Willkommen bei %s
|
||||
register_notify.title=%[1]s, willkommen bei %[2]s
|
||||
register_notify.text_1=dies ist deine Bestätigungs-E-Mail für %s!
|
||||
register_notify.text_2=Du kannst dich jetzt mit dem Benutzernamen "%s" anmelden.
|
||||
@ -560,6 +588,8 @@ lang_select_error=Wähle eine Sprache aus der Liste aus.
|
||||
|
||||
username_been_taken=Der Benutzername ist bereits vergeben.
|
||||
username_change_not_local_user=Nicht-lokale Benutzer dürfen ihren Nutzernamen nicht ändern.
|
||||
change_username_disabled=Ändern des Benutzernamens ist deaktiviert.
|
||||
change_full_name_disabled=Ändern des vollständigen Namens ist deaktiviert.
|
||||
username_has_not_been_changed=Benutzername wurde nicht geändert
|
||||
repo_name_been_taken=Der Repository-Name wird schon verwendet.
|
||||
repository_force_private=Privat erzwingen ist aktiviert: Private Repositories können nicht veröffentlicht werden.
|
||||
@ -609,6 +639,7 @@ org_still_own_repo=Diese Organisation besitzt noch ein oder mehrere Repositories
|
||||
org_still_own_packages=Diese Organisation besitzt noch ein oder mehrere Pakete, lösche diese zuerst.
|
||||
|
||||
target_branch_not_exist=Der Ziel-Branch existiert nicht.
|
||||
target_ref_not_exist=Zielreferenz existiert nicht %s
|
||||
|
||||
admin_cannot_delete_self=Du kannst dich nicht selbst löschen, wenn du ein Administrator bist. Bitte entferne zuerst deine Administratorrechte.
|
||||
|
||||
@ -618,6 +649,7 @@ joined_on=Beigetreten am %s
|
||||
repositories=Repositories
|
||||
activity=Öffentliche Aktivität
|
||||
followers=Follower
|
||||
show_more=Mehr anzeigen
|
||||
starred=Favoriten
|
||||
watched=Beobachtete Repositories
|
||||
code=Quelltext
|
||||
@ -684,6 +716,8 @@ public_profile=Öffentliches Profil
|
||||
biography_placeholder=Erzähle uns ein wenig über Dich selbst! (Du kannst Markdown verwenden)
|
||||
location_placeholder=Teile Deinen ungefähren Standort mit anderen
|
||||
profile_desc=Lege fest, wie dein Profil anderen Benutzern angezeigt wird. Deine primäre E-Mail-Adresse wird für Benachrichtigungen, Passwort-Wiederherstellung und webbasierte Git-Operationen verwendet.
|
||||
password_username_disabled=Du bist nicht berechtigt, den Benutzernamen zu ändern. Bitte kontaktiere Deinen Seitenadministrator für weitere Details.
|
||||
password_full_name_disabled=Du bist nicht berechtigt, den vollständigen Namen zu ändern. Bitte kontaktiere Deinen Seitenadministrator für weitere Details.
|
||||
full_name=Vollständiger Name
|
||||
website=Webseite
|
||||
location=Standort
|
||||
@ -701,6 +735,7 @@ cancel=Abbrechen
|
||||
language=Sprache
|
||||
ui=Theme
|
||||
hidden_comment_types=Ausgeblendeter Kommentartypen
|
||||
hidden_comment_types_description=Die hier markierten Kommentartypen werden nicht innerhalb der Issue-Seiten angezeigt. Beispielsweise entfernt das Markieren von "Label" alle "{user} hat {label} hinzugefügt/entfernt"-Kommentare.
|
||||
hidden_comment_types.ref_tooltip=Kommentare, in denen dieses Issue von einem anderen Issue/Commit referenziert wurde
|
||||
hidden_comment_types.issue_ref_tooltip=Kommentare, bei denen der Benutzer den Branch/Tag des Issues ändert
|
||||
comment_type_group_reference=Verweis auf Mitglieder
|
||||
@ -732,6 +767,7 @@ uploaded_avatar_not_a_image=Die hochgeladene Datei ist kein Bild.
|
||||
uploaded_avatar_is_too_big=Die hochgeladene Dateigröße (%d KiB) überschreitet die maximale Größe (%d KiB).
|
||||
update_avatar_success=Dein Profilbild wurde geändert.
|
||||
update_user_avatar_success=Der Avatar des Benutzers wurde aktualisiert.
|
||||
cropper_prompt=Sie können das Bild vor dem Speichern bearbeiten. Das bearbeitete Bild wird als PNG-Datei gespeichert.
|
||||
|
||||
change_password=Passwort aktualisieren
|
||||
old_password=Aktuelles Passwort
|
||||
@ -747,6 +783,8 @@ manage_themes=Standard-Theme auswählen
|
||||
manage_openid=OpenID-Adressen verwalten
|
||||
email_desc=Deine primäre E-Mail-Adresse wird für Benachrichtigungen, Passwort-Wiederherstellung und, sofern sie nicht versteckt ist, web-basierte Git-Operationen verwendet.
|
||||
theme_desc=Dies wird dein Standard-Theme auf der Seite sein.
|
||||
theme_colorblindness_help=Hilfe zum Theme für Farbenblinde
|
||||
theme_colorblindness_prompt=Gitea erhält aktuell einfache Unterstützung für Farbenblinde durch einige Themes, die nur wenige Farben definiert haben. Die Arbeit ist noch im Gange. Weitere Verbesserungen können durch die Definition von mehr Farben in den CSS-Theme-Dateien vorgenommen werden.
|
||||
primary=Primär
|
||||
activated=Aktiviert
|
||||
requires_activation=Erfordert Aktivierung
|
||||
@ -871,8 +909,9 @@ repo_and_org_access=Repository- und Organisationszugriff
|
||||
permissions_public_only=Nur öffentlich
|
||||
permissions_access_all=Alle (öffentlich, privat und begrenzt)
|
||||
select_permissions=Berechtigungen auswählen
|
||||
permission_not_set=Nicht festgelegt
|
||||
permission_no_access=Kein Zugriff
|
||||
permission_read=Gelesen
|
||||
permission_read=Lesen
|
||||
permission_write=Lesen und Schreiben
|
||||
access_token_desc=Ausgewählte Token-Berechtigungen beschränken die Authentifizierung auf die entsprechenden <a %s>API</a>-Routen. Lies die <a %s>Dokumentation</a> für mehr Informationen.
|
||||
at_least_one_permission=Du musst mindestens eine Berechtigung auswählen, um ein Token zu erstellen
|
||||
@ -890,6 +929,7 @@ create_oauth2_application_success=Du hast erfolgreich eine neue OAuth2-Anwendung
|
||||
update_oauth2_application_success=Du hast die OAuth2-Anwendung erfolgreich aktualisiert.
|
||||
oauth2_application_name=Name der Anwendung
|
||||
oauth2_confidential_client=Vertraulicher Client. Für Anwendungen aktivieren, die das Geheimnis sicher speichern, z. B. Webanwendungen. Wähle diese Option nicht für native Anwendungen für PCs und Mobilgeräte.
|
||||
oauth2_skip_secondary_authorization=Autorisierung für öffentliche Clients nach einmaliger Gewährung des Zugriffs überspringen. <strong>Dies kann ein Sicherheitsrisiko darstellen.</strong>
|
||||
oauth2_redirect_uris=URIs für die Weiterleitung. Bitte verwende eine neue Zeile für jede URI.
|
||||
save_application=Speichern
|
||||
oauth2_client_id=Client-ID
|
||||
@ -900,6 +940,7 @@ oauth2_client_secret_hint=Das Secret wird nach dem Verlassen oder Aktualisieren
|
||||
oauth2_application_edit=Bearbeiten
|
||||
oauth2_application_create_description=OAuth2 Anwendungen geben deiner Drittanwendung Zugriff auf Benutzeraccounts dieser Gitea-Instanz.
|
||||
oauth2_application_remove_description=Das Entfernen einer OAuth2-Anwendung hat zur Folge, dass diese nicht mehr auf autorisierte Benutzeraccounts auf dieser Instanz zugreifen kann. Möchtest Du fortfahren?
|
||||
oauth2_application_locked=Wenn es in der Konfiguration aktiviert ist, registriert Gitea einige OAuth2-Anwendungen beim Starten vor. Um unerwartetes Verhalten zu verhindern, können diese weder bearbeitet noch entfernt werden. Weitere Informationen findest Du in der OAuth2-Dokumentation.
|
||||
|
||||
authorized_oauth2_applications=Autorisierte OAuth2-Anwendungen
|
||||
authorized_oauth2_applications_description=Den folgenden Drittanbieter-Apps hast Du Zugriff auf Deinen persönlichen Gitea-Account gewährt. Bitte widerrufe die Autorisierung für Apps, die Du nicht mehr nutzt.
|
||||
@ -908,20 +949,26 @@ revoke_oauth2_grant=Autorisierung widerrufen
|
||||
revoke_oauth2_grant_description=Wenn du die Autorisierung widerrufst, kann die Anwendung nicht mehr auf deine Daten zugreifen. Bist du dir sicher?
|
||||
revoke_oauth2_grant_success=Zugriff erfolgreich widerrufen.
|
||||
|
||||
twofa_desc=Um dein Konto vor Passwortdiebstahl zu schützen, kannst du ein Smartphone oder ein anderes Gerät verwenden, um zeitbasierte Einmalpasswörter ("TOTP") zu erhalten.
|
||||
twofa_recovery_tip=Wenn du dein Gerät verlierst, kannst du einen einmalig verwendbaren Wiederherstellungsschlüssel nutzen, um den Zugriff auf dein Konto wiederherzustellen.
|
||||
twofa_is_enrolled=Für dein Konto ist die Zwei-Faktor-Authentifizierung <strong>eingeschaltet</strong>.
|
||||
twofa_not_enrolled=Für dein Konto ist die Zwei-Faktor-Authentifizierung momentan nicht eingeschaltet.
|
||||
twofa_disable=Zwei-Faktor-Authentifizierung deaktivieren
|
||||
twofa_scratch_token_regenerate=Einweg-Wiederherstellungsschlüssel neu generieren
|
||||
twofa_scratch_token_regenerated=Dein Einweg-Wiederherstellungsschlüssel ist jetzt %s. Speichere ihn an einem sicheren Ort, er wird nie wieder angezeigt.
|
||||
twofa_enroll=Zwei-Faktor-Authentifizierung aktivieren
|
||||
twofa_disable_note=Du kannst die Zwei-Faktor-Authentifizierung auch wieder deaktivieren.
|
||||
twofa_disable_desc=Wenn du die Zwei-Faktor-Authentifizierung deaktivierst, wird die Sicherheit deines Kontos verringert. Fortfahren?
|
||||
regenerate_scratch_token_desc=Wenn du deinen Wiederherstellungsschlüssel verlegt oder bereits benutzt hast, kannst du ihn hier zurücksetzen.
|
||||
twofa_disabled=Zwei-Faktor-Authentifizierung wurde deaktiviert.
|
||||
scan_this_image=Scanne diese Grafik mit deiner Authentifizierungs-App:
|
||||
or_enter_secret=Oder gib das Secret ein: %s
|
||||
then_enter_passcode=Und gebe dann die angezeigte PIN der Anwendung ein:
|
||||
passcode_invalid=Die PIN ist falsch. Probiere es erneut.
|
||||
twofa_enrolled=Die Zwei-Faktor-Authentifizierung wurde für dein Konto aktiviert. Bewahre deinen Einweg-Wiederherstellungsschlüssel (%s) an einem sicheren Ort auf, da er nicht wieder angezeigt werden wird.
|
||||
twofa_failed_get_secret=Fehler beim Abrufen des Secrets.
|
||||
|
||||
webauthn_desc=Sicherheitsschlüssel sind Geräte, die kryptografische Schlüssel beeinhalten. Diese können für die Zwei-Faktor-Authentifizierung verwendet werden. Der Sicherheitsschlüssel muss den Standard "<a rel="noreferrer" target="_blank" href="%s">WebAuthn</a>" unterstützen.
|
||||
webauthn_register_key=Sicherheitsschlüssel hinzufügen
|
||||
webauthn_nickname=Nickname
|
||||
webauthn_delete_key=Sicherheitsschlüssel entfernen
|
||||
@ -987,6 +1034,8 @@ fork_to_different_account=Fork in ein anderes Konto erstellen
|
||||
fork_visibility_helper=Die Sichtbarkeit eines geforkten Repositories kann nicht geändert werden.
|
||||
fork_branch=Branch, der zum Fork geklont werden soll
|
||||
all_branches=Alle Branches
|
||||
view_all_branches=Alle Branches anzeigen
|
||||
view_all_tags=Alle Tags anzeigen
|
||||
fork_no_valid_owners=Dieses Repository kann nicht geforkt werden, da keine gültigen Besitzer vorhanden sind.
|
||||
fork.blocked_user=Das Repository kann nicht geforkt werden, da du vom Repository-Eigentümer blockiert wurdest.
|
||||
use_template=Dieses Template verwenden
|
||||
@ -998,6 +1047,8 @@ generate_repo=Repository erstellen
|
||||
generate_from=Erstelle aus
|
||||
repo_desc=Beschreibung
|
||||
repo_desc_helper=Gib eine kurze Beschreibung an (optional)
|
||||
repo_no_desc=Keine Beschreibung vorhanden
|
||||
repo_lang=Sprachen
|
||||
repo_gitignore_helper=Wähle eine .gitignore-Vorlage aus.
|
||||
repo_gitignore_helper_desc=Wähle aus einer Liste an Vorlagen für bekannte Sprachen, welche Dateien ignoriert werden sollen. Typische Artefakte, die durch die Build Tools der gewählten Sprache generiert werden, sind standardmäßig Bestandteil der .gitignore.
|
||||
issue_labels=Issue Label
|
||||
@ -1005,6 +1056,7 @@ issue_labels_helper=Wähle ein Issue-Label-Set.
|
||||
license=Lizenz
|
||||
license_helper=Wähle eine Lizenz aus.
|
||||
license_helper_desc=Eine Lizenz regelt, was Andere mit deinem Code (nicht) tun können. Unsicher, welches für dein Projekt die Richtige ist? Siehe <a target="_blank" rel="noopener noreferrer" href="%s">eine Lizenz wählen</a>.
|
||||
multiple_licenses=Mehrere Lizenzen
|
||||
object_format=Objektformat
|
||||
object_format_helper=Objektformat des Repositories. Es kann später nicht geändert werden. SHA1 ist am meisten kompatibel.
|
||||
readme=README
|
||||
@ -1058,13 +1110,16 @@ delete_preexisting_success=Nicht übernommene Dateien in %s gelöscht
|
||||
blame_prior=Blame vor dieser Änderung anzeigen
|
||||
blame.ignore_revs=Revisionen in <a href="%s">.git-blame-ignore-revs</a> werden ignoriert. Klicke <a href="%s">hier, um das zu umgehen</a> und die normale Blame-Ansicht zu sehen.
|
||||
blame.ignore_revs.failed=Fehler beim Ignorieren der Revisionen in <a href="%s">.git-blame-ignore-revs</a>.
|
||||
user_search_tooltip=Zeigt maximal 30 Benutzer
|
||||
|
||||
tree_path_not_found_commit=Pfad %[1]s existiert nicht in Commit%[2]s
|
||||
tree_path_not_found_branch=Pfad %[1]s existiert nicht in Branch %[2]s
|
||||
tree_path_not_found_tag=Pfad %[1]s existiert nicht in Tag %[2]s
|
||||
|
||||
transfer.accept=Übertragung Akzeptieren
|
||||
transfer.accept_desc=`Übertragung nach "%s"`
|
||||
transfer.reject=Übertragung Ablehnen
|
||||
transfer.reject_desc=Übertragung nach "%s " abbrechen
|
||||
transfer.no_permission_to_accept=Du hast keine Berechtigung, diesen Transfer anzunehmen.
|
||||
transfer.no_permission_to_reject=Du hast keine Berechtigung, diesen Transfer abzulehnen.
|
||||
|
||||
@ -1139,6 +1194,11 @@ migrate.gogs.description=Daten von notabug.org oder anderen Gogs Instanzen migri
|
||||
migrate.onedev.description=Daten von code.onedev.io oder anderen OneDev Instanzen migrieren.
|
||||
migrate.codebase.description=Daten von codebasehq.com migrieren.
|
||||
migrate.gitbucket.description=Daten von GitBucket Instanzen migrieren.
|
||||
migrate.codecommit.description=Daten von AWS CodeCommit migrieren.
|
||||
migrate.codecommit.aws_access_key_id=AWS Access Key ID
|
||||
migrate.codecommit.aws_secret_access_key=AWS Secret Access Key
|
||||
migrate.codecommit.https_git_credentials_username=HTTPS-Git-Nutzername
|
||||
migrate.codecommit.https_git_credentials_password=HTTPS-Git-Passwort
|
||||
migrate.migrating_git=Git-Daten werden migriert
|
||||
migrate.migrating_topics=Themen werden migriert
|
||||
migrate.migrating_milestones=Meilensteine werden migriert
|
||||
@ -1199,6 +1259,7 @@ releases=Releases
|
||||
tag=Tag
|
||||
released_this=hat released
|
||||
tagged_this=hat getaggt
|
||||
file.title=%s in %s
|
||||
file_raw=Originalformat
|
||||
file_history=Verlauf
|
||||
file_view_source=Quelltext anzeigen
|
||||
@ -1206,12 +1267,16 @@ file_view_rendered=Ansicht rendern
|
||||
file_view_raw=Originalformat anzeigen
|
||||
file_permalink=Permalink
|
||||
file_too_large=Die Datei ist zu groß zum Anzeigen.
|
||||
file_is_empty=Die Datei ist leer.
|
||||
code_preview_line_from_to=Zeilen %[1]d bis %[2]d in %[3]s
|
||||
code_preview_line_in=Zeile %[1]d in %[2]s
|
||||
invisible_runes_header=`Diese Datei enthält unsichtbare Unicode-Zeichen`
|
||||
invisible_runes_description=`Diese Datei enthält unsichtbare Unicode-Zeichen, die für Menschen nicht unterscheidbar sind, aber von einem Computer unterschiedlich verarbeitet werden können. Wenn du glaubst, dass das absichtlich so ist, kannst du diese Warnung ignorieren. Benutze den „Escape“-Button, um versteckte Zeichen anzuzeigen.`
|
||||
ambiguous_runes_header=`Diese Datei enthält mehrdeutige Unicode-Zeichen`
|
||||
ambiguous_runes_description=`Diese Datei enthält Unicode-Zeichen, die mit anderen Zeichen verwechselt werden können. Wenn du glaubst, dass das absichtlich so ist, kannst du diese Warnung ignorieren. Benutze den „Escape“-Button, um versteckte Zeichen anzuzeigen.`
|
||||
invisible_runes_line=`Diese Zeile enthält unsichtbare Unicode-Zeichen`
|
||||
ambiguous_runes_line=`Diese Zeile enthält mehrdeutige Unicode-Zeichen`
|
||||
ambiguous_character=`%[1]c [U+%04[1]X] kann mit %[2]c [U+%04[2]X] verwechselt werden`
|
||||
|
||||
escape_control_characters=Escapen
|
||||
unescape_control_characters=Unescapen
|
||||
@ -1259,6 +1324,7 @@ editor.or=oder
|
||||
editor.cancel_lower=Abbrechen
|
||||
editor.commit_signed_changes=Committe signierte Änderungen
|
||||
editor.commit_changes=Änderungen committen
|
||||
editor.add_tmpl='{filename}' hinzufügen
|
||||
editor.add=%s hinzugefügt
|
||||
editor.update=%s aktualisiert
|
||||
editor.delete=%s gelöscht
|
||||
@ -1342,6 +1408,7 @@ commitstatus.success=Erfolg
|
||||
ext_issues=Zugriff auf Externe Issues
|
||||
ext_issues.desc=Link zu externem Issuetracker.
|
||||
|
||||
projects.desc=Verwalte Issues und Pull-Requests in Projekten.
|
||||
projects.description=Beschreibung (optional)
|
||||
projects.description_placeholder=Beschreibung
|
||||
projects.create=Projekt erstellen
|
||||
@ -1401,7 +1468,9 @@ issues.new.clear_milestone=Meilenstein entfernen
|
||||
issues.new.assignees=Zuständig
|
||||
issues.new.clear_assignees=Zuständige entfernen
|
||||
issues.new.no_assignees=Niemand zuständig
|
||||
issues.new.no_reviewers=Keine Reviewer
|
||||
issues.new.blocked_user=Das Issue kann nicht erstellt werden, da du vom Repository-Eigentümer blockiert wurdest.
|
||||
issues.edit.already_changed=Änderungen zum Issue konnten nicht gespeichert werden. Es scheint, dass der Inhalt bereits von einem anderen Benutzer geändert wurde. Bitte aktualisiere die Seite und bearbeite diese erneut, um zu verhindern, dass die Änderungen des anderen Benutzers überschrieben werden
|
||||
issues.edit.blocked_user=Der Inhalt kann nicht bearbeitet werden, da du vom Repository-Eigentümer blockiert wurdest.
|
||||
issues.choose.get_started=Los geht's
|
||||
issues.choose.open_external_link=Öffnen
|
||||
@ -1428,6 +1497,7 @@ issues.remove_labels=hat die Labels %s %s entfernt
|
||||
issues.add_remove_labels=hat %s hinzugefügt, und %s %s entfernt
|
||||
issues.add_milestone_at=`hat diesen Issue %[2]s zum <b>%[1]s</b> Meilenstein hinzugefügt`
|
||||
issues.add_project_at=`hat dieses zum <b>%s</b> projekt %s hinzugefügt`
|
||||
issues.move_to_column_of_project=`hat dies zu %s in %s %s verschoben`
|
||||
issues.change_milestone_at=`hat den Meilenstein %[3]s von <b>%[1]s</b> zu <b>%[2]s</b> geändert`
|
||||
issues.change_project_at=`hat das Projekt %[3]s von <b>%[1]s</b> zu <b>%[2]s</b> geändert`
|
||||
issues.remove_milestone_at=`hat dieses Issue %[2]s vom <b>%[1]s</b> Meilenstein entfernt`
|
||||
@ -1459,6 +1529,8 @@ issues.filter_assignee=Zuständig
|
||||
issues.filter_assginee_no_select=Alle Zuständigen
|
||||
issues.filter_assginee_no_assignee=Niemand zuständig
|
||||
issues.filter_poster=Autor
|
||||
issues.filter_user_placeholder=Benutzer suchen
|
||||
issues.filter_user_no_select=Alle Benutzer
|
||||
issues.filter_type=Typ
|
||||
issues.filter_type.all_issues=Alle Issues
|
||||
issues.filter_type.assigned_to_you=Dir zugewiesen
|
||||
@ -1512,7 +1584,9 @@ issues.no_content=Keine Beschreibung angegeben.
|
||||
issues.close=Issue schließen
|
||||
issues.comment_pull_merged_at=hat Commit %[1]s in %[2]s %[3]s gemerged
|
||||
issues.comment_manually_pull_merged_at=hat Commit %[1]s in %[2]s %[3]s manuell gemerged
|
||||
issues.close_comment_issue=Kommentieren und schließen
|
||||
issues.reopen_issue=Wieder öffnen
|
||||
issues.reopen_comment_issue=Kommentieren und wieder öffnen
|
||||
issues.create_comment=Kommentieren
|
||||
issues.comment.blocked_user=Der Kommentar kann nicht erstellt oder bearbeitet werden, da du vom Repository-Eigentümer blockiert wurdest.
|
||||
issues.closed_at=`hat diesen Issue <a id="%[1]s" href="#%[1]s">%[2]s</a> geschlossen`
|
||||
@ -1601,12 +1675,25 @@ issues.delete.title=Dieses Issue löschen?
|
||||
issues.delete.text=Möchtest du dieses Issue wirklich löschen? (Dadurch wird der Inhalt dauerhaft gelöscht. Denke daran, es stattdessen zu schließen, wenn du es archivieren willst)
|
||||
|
||||
issues.tracker=Zeiterfassung
|
||||
issues.timetracker_timer_start=Timer starten
|
||||
issues.timetracker_timer_stop=Timer stoppen
|
||||
issues.timetracker_timer_discard=Timer verwerfen
|
||||
issues.timetracker_timer_manually_add=Zeit hinzufügen
|
||||
|
||||
issues.time_estimate_set=Geschätzte Zeit festlegen
|
||||
issues.time_estimate_display=Schätzung: %s
|
||||
issues.change_time_estimate_at=Zeitschätzung geändert zu <b>%s</b> %s
|
||||
issues.remove_time_estimate_at=Zeitschätzung %s entfernt
|
||||
issues.time_estimate_invalid=Format der Zeitschätzung ist ungültig
|
||||
issues.start_tracking_history=hat die Zeiterfassung %s gestartet
|
||||
issues.tracker_auto_close=Der Timer wird automatisch gestoppt, wenn dieser Issue geschlossen wird
|
||||
issues.tracking_already_started=`Du hast die Zeiterfassung bereits in <a href="%s">diesem Issue</a> gestartet!`
|
||||
issues.stop_tracking_history=hat für <b>%s</b> gearbeitet %s
|
||||
issues.cancel_tracking_history=`hat die Zeiterfassung %s abgebrochen`
|
||||
issues.del_time=Diese Zeiterfassung löschen
|
||||
issues.add_time_history=hat <b>%s</b> gearbeitete Zeit hinzugefügt %s
|
||||
issues.del_time_history=`hat %s gearbeitete Zeit gelöscht`
|
||||
issues.add_time_manually=Zeit manuell hinzufügen
|
||||
issues.add_time_hours=Stunden
|
||||
issues.add_time_minutes=Minuten
|
||||
issues.add_time_sum_to_small=Es wurde keine Zeit eingegeben.
|
||||
@ -1666,6 +1753,7 @@ issues.dependency.add_error_dep_not_same_repo=Beide Issues müssen sich im selbe
|
||||
issues.review.self.approval=Du kannst nicht dein eigenen Pull-Request genehmigen.
|
||||
issues.review.self.rejection=Du kannst keine Änderungen an deinem eigenen Pull-Request anfragen.
|
||||
issues.review.approve=hat die Änderungen %s genehmigt
|
||||
issues.review.comment=hat %s überprüft
|
||||
issues.review.dismissed=verwarf %ss Review %s
|
||||
issues.review.dismissed_label=Verworfen
|
||||
issues.review.left_comment=hat einen Kommentar hinterlassen
|
||||
@ -1691,6 +1779,11 @@ issues.review.resolve_conversation=Diskussion als "erledigt" markieren
|
||||
issues.review.un_resolve_conversation=Diskussion als "nicht-erledigt" markieren
|
||||
issues.review.resolved_by=markierte diese Unterhaltung als gelöst
|
||||
issues.review.commented=Kommentieren
|
||||
issues.review.official=Genehmigt
|
||||
issues.review.requested=Prüfung ausstehend
|
||||
issues.review.rejected=Änderungen angefordert
|
||||
issues.review.stale=Aktualisiert seit der Genehmigung
|
||||
issues.review.unofficial=Ungezählte Genehmigung
|
||||
issues.assignee.error=Aufgrund eines unerwarteten Fehlers konnten nicht alle Beauftragten hinzugefügt werden.
|
||||
issues.reference_issue.body=Beschreibung
|
||||
issues.content_history.deleted=gelöscht
|
||||
@ -1707,6 +1800,8 @@ compare.compare_head=vergleichen
|
||||
pulls.desc=Pull-Requests und Code-Reviews aktivieren.
|
||||
pulls.new=Neuer Pull-Request
|
||||
pulls.new.blocked_user=Der Pull Request kann nicht erstellt werden, da du vom Repository-Eigentümer blockiert wurdest.
|
||||
pulls.new.must_collaborator=Du musst Mitarbeiter sein, um Pull-Requests zu erstellen.
|
||||
pulls.edit.already_changed=Änderungen zum Pull-Request konnten nicht gespeichert werden. Es scheint, dass der Inhalt bereits von einem anderen Benutzer geändert wurde. Bitte aktualisieren die Seite und bearbeite diesen erneut, um zu verhindern, dass die Änderungen des anderen Benutzers überschrieben werden
|
||||
pulls.view=Pull-Request ansehen
|
||||
pulls.compare_changes=Neuer Pull-Request
|
||||
pulls.allow_edits_from_maintainers=Änderungen von Maintainern erlauben
|
||||
@ -1762,6 +1857,8 @@ pulls.is_empty=Die Änderungen an diesem Branch sind bereits auf dem Zielbranch.
|
||||
pulls.required_status_check_failed=Einige erforderliche Prüfungen waren nicht erfolgreich.
|
||||
pulls.required_status_check_missing=Einige erforderliche Prüfungen fehlen.
|
||||
pulls.required_status_check_administrator=Als Administrator kannst du diesen Pull-Request weiterhin mergen.
|
||||
pulls.blocked_by_approvals=Dieser Pull-Request hat noch nicht genügend Genehmigungen. %d von %d Genehmigungen erteilt.
|
||||
pulls.blocked_by_approvals_whitelisted=Dieser Pull-Request hat noch nicht genug erforderliche Genehmigungen. %d von %d Genehmigungen von Benutzern oder Teams auf der Berechtigungsliste.
|
||||
pulls.blocked_by_rejection=Dieser Pull-Request hat Änderungen, die von einem offiziellen Reviewer angefragt wurden.
|
||||
pulls.blocked_by_official_review_requests=Dieser Pull Request hat offizielle Review-Anfragen.
|
||||
pulls.blocked_by_outdated_branch=Dieser Pull Request ist blockiert, da er veraltet ist.
|
||||
@ -1803,7 +1900,9 @@ pulls.unrelated_histories=Merge fehlgeschlagen: Der Head des Merges und die Basi
|
||||
pulls.merge_out_of_date=Merge fehlgeschlagen: Während des Mergens wurde die Basis aktualisiert. Hinweis: Versuche es erneut.
|
||||
pulls.head_out_of_date=Mergen fehlgeschlagen: Der Head wurde aktualisiert während der Merge erstellt wurde. Tipp: Versuche es erneut.
|
||||
pulls.has_merged=Fehler: Der Pull-Request wurde gemerged, du kannst den Zielbranch nicht wieder mergen oder ändern.
|
||||
pulls.push_rejected=Push fehlgeschlagen: Der Push wurde abgelehnt. Überprüfe die Git Hooks für dieses Repository.
|
||||
pulls.push_rejected_summary=Vollständige Ablehnungsmeldung
|
||||
pulls.push_rejected_no_message=Push fehlgeschlagen: Der Push wurde abgelehnt, aber es gab keine Fehlermeldung. Überprüfe die Git Hooks für dieses Repository
|
||||
pulls.open_unmerged_pull_exists=`Du kannst diesen Pull-Request nicht erneut öffnen, da noch ein anderer (#%d) mit identischen Eigenschaften offen ist.`
|
||||
pulls.status_checking=Einige Prüfungen sind noch ausstehend
|
||||
pulls.status_checks_success=Alle Prüfungen waren erfolgreich
|
||||
@ -1827,6 +1926,7 @@ pulls.cmd_instruction_checkout_title=Checkout
|
||||
pulls.cmd_instruction_checkout_desc=Wechsle auf einen neuen Branch in deinem lokalen Repository und teste die Änderungen.
|
||||
pulls.cmd_instruction_merge_title=Mergen
|
||||
pulls.cmd_instruction_merge_desc=Die Änderungen mergen und auf Gitea aktualisieren.
|
||||
pulls.cmd_instruction_merge_warning=Warnung: Dieser Vorgang kann den Pull-Request nicht mergen, da "manueller Merge" nicht aktiviert wurde
|
||||
pulls.clear_merge_message=Merge-Nachricht löschen
|
||||
pulls.clear_merge_message_hint=Das Löschen der Merge-Nachricht wird nur den Inhalt der Commit-Nachricht entfernen und generierte Git-Trailer wie "Co-Authored-By …" erhalten.
|
||||
|
||||
@ -1846,9 +1946,15 @@ pulls.delete.title=Diesen Pull-Request löschen?
|
||||
pulls.delete.text=Willst du diesen Pull-Request wirklich löschen? (Dies wird den Inhalt unwiderruflich löschen. Überlege, ob du ihn nicht lieber schließen willst, um ihn zu archivieren)
|
||||
|
||||
pulls.recently_pushed_new_branches=Du hast auf den Branch <strong>%[1]s</strong> %[2]s gepusht
|
||||
pulls.upstream_diverging_prompt_behind_1=Dieser Branch ist %[1]d Commit hinter %[2]s
|
||||
pulls.upstream_diverging_prompt_behind_n=Dieser Branch ist %[1]d Commits hinter %[2]s
|
||||
pulls.upstream_diverging_prompt_base_newer=Der Basis-Branch %s hat neue Änderungen
|
||||
pulls.upstream_diverging_merge=Fork synchronisieren
|
||||
|
||||
pull.deleted_branch=(gelöscht):%s
|
||||
pull.agit_documentation=Dokumentation zu AGit durchschauen
|
||||
|
||||
comments.edit.already_changed=Änderungen zum Kommentar konnten nicht gespeichert werden. Es scheint, dass der Inhalt bereits von einem anderen Benutzer geändert wurde. Bitte aktualisiere die Seite und bearbeite diesen erneut, um zu verhindern, dass die Änderungen des anderen Benutzers überschrieben werden
|
||||
|
||||
milestones.new=Neuer Meilenstein
|
||||
milestones.closed=Geschlossen %s
|
||||
@ -1857,6 +1963,7 @@ milestones.no_due_date=Kein Fälligkeitsdatum
|
||||
milestones.open=Öffnen
|
||||
milestones.close=Schließen
|
||||
milestones.new_subheader=Benutze Meilensteine, um Issues zu organisieren und den Fortschritt darzustellen.
|
||||
milestones.completeness=<strong>%d%%</strong> abgeschlossen
|
||||
milestones.create=Meilenstein erstellen
|
||||
milestones.title=Titel
|
||||
milestones.desc=Beschreibung
|
||||
@ -2041,12 +2148,14 @@ settings.push_mirror_sync_in_progress=Aktuell werden Änderungen auf %s gepusht.
|
||||
settings.site=Webseite
|
||||
settings.update_settings=Einstellungen speichern
|
||||
settings.update_mirror_settings=Mirror-Einstellungen aktualisieren
|
||||
settings.branches.switch_default_branch=Standardbranch wechseln
|
||||
settings.branches.update_default_branch=Standardbranch aktualisieren
|
||||
settings.branches.add_new_rule=Neue Regel hinzufügen
|
||||
settings.advanced_settings=Erweiterte Einstellungen
|
||||
settings.wiki_desc=Repository-Wiki aktivieren
|
||||
settings.use_internal_wiki=Eingebautes Wiki verwenden
|
||||
settings.default_wiki_branch_name=Standardbezeichnung für Wiki-Branch
|
||||
settings.default_wiki_everyone_access=Standard-Zugriffsberechtigung für angemeldete Benutzer:
|
||||
settings.failed_to_change_default_wiki_branch=Das Ändern des Standard-Wiki-Branches ist fehlgeschlagen.
|
||||
settings.use_external_wiki=Externes Wiki verwenden
|
||||
settings.external_wiki_url=Externe Wiki-URL
|
||||
@ -2077,6 +2186,7 @@ settings.pulls.default_delete_branch_after_merge=Standardmäßig bei Pull-Reques
|
||||
settings.pulls.default_allow_edits_from_maintainers=Änderungen von Maintainern standardmäßig erlauben
|
||||
settings.releases_desc=Repository-Releases aktivieren
|
||||
settings.packages_desc=Repository Packages Registry aktivieren
|
||||
settings.projects_desc=Projekte aktivieren
|
||||
settings.projects_mode_desc=Projekte-Modus (welche Art Projekte angezeigt werden sollen)
|
||||
settings.projects_mode_repo=Nur Repo-Projekte
|
||||
settings.projects_mode_owner=Nur Benutzer- oder Organisations-Projekte
|
||||
@ -2116,6 +2226,7 @@ settings.transfer_in_progress=Es gibt derzeit eine laufende Übertragung. Bitte
|
||||
settings.transfer_notices_1=– Du wirst keinen Zugriff mehr haben, wenn der neue Besitzer ein individueller Benutzer ist.
|
||||
settings.transfer_notices_2=– Du wirst weiterhin Zugriff haben, wenn der neue Besitzer eine Organisation ist und du einer der Besitzer bist.
|
||||
settings.transfer_notices_3=- Wenn das Repository privat ist und an einen einzelnen Benutzer übertragen wird, wird sichergestellt, dass der Benutzer mindestens Leserechte hat (und die Berechtigungen werden gegebenenfalls ändert).
|
||||
settings.transfer_notices_4=- Wenn das Repository einer Organisation gehört und du es an eine andere Organisation oder eine andere Person überträgst, verlierst du die Verlinkungen zwischen den Issues des Repositorys und dem Projektboard der Organisation.
|
||||
settings.transfer_owner=Neuer Besitzer
|
||||
settings.transfer_perform=Übertragung durchführen
|
||||
settings.transfer_started=`Für dieses Repository wurde eine Übertragung eingeleitet und wartet nun auf die Bestätigung von "%s"`
|
||||
@ -2215,6 +2326,7 @@ settings.event_wiki_desc=Wiki-Seite erstellt, umbenannt, bearbeitet oder gelösc
|
||||
settings.event_release=Release
|
||||
settings.event_release_desc=Release in einem Repository veröffentlicht, aktualisiert oder gelöscht.
|
||||
settings.event_push=Push
|
||||
settings.event_force_push=Force Push
|
||||
settings.event_push_desc=Git push in ein Repository.
|
||||
settings.event_repository=Repository
|
||||
settings.event_repository_desc=Repository erstellt oder gelöscht.
|
||||
@ -2251,6 +2363,7 @@ settings.event_pull_request_merge=Pull-Request-Merge
|
||||
settings.event_package=Paket
|
||||
settings.event_package_desc=Paket wurde in einem Repository erstellt oder gelöscht.
|
||||
settings.branch_filter=Branch-Filter
|
||||
settings.branch_filter_desc=Whitelist für Branches für Push-, Erzeugungs- und Löschevents, als Glob-Pattern beschrieben. Es werden Events für alle Branches gemeldet, falls das Pattern <code>*</code> ist, oder falls es leer ist. Siehe die <a href="%[1]s">%[2]s</a> Dokumentation für die Syntax (Englisch). Beispiele: <code>master</code>, <code>{master,release*}</code>.
|
||||
settings.authorization_header=Authorization-Header
|
||||
settings.authorization_header_desc=Wird, falls vorhanden, als Authorization-Header mitgesendet. Beispiele: %s.
|
||||
settings.active=Aktiv
|
||||
@ -2299,22 +2412,50 @@ settings.branches=Branches
|
||||
settings.protected_branch=Branch-Schutz
|
||||
settings.protected_branch.save_rule=Regel speichern
|
||||
settings.protected_branch.delete_rule=Regel löschen
|
||||
settings.protected_branch_can_push=Push erlauben?
|
||||
settings.protected_branch_can_push_yes=Du kannst pushen
|
||||
settings.protected_branch_can_push_no=Du kannst nicht pushen
|
||||
settings.branch_protection=Branch-Schutz für Branch '<b>%s</b>'
|
||||
settings.protect_this_branch=Branch-Schutz aktivieren
|
||||
settings.protect_this_branch_desc=Verhindert das Löschen und schränkt Git auf Push- und Merge-Änderungen auf dem Branch ein.
|
||||
settings.protect_disable_push=Push deaktivieren
|
||||
settings.protect_disable_push_desc=Kein Push auf diesen Branch erlauben.
|
||||
settings.protect_disable_force_push=Force-Push deaktivieren
|
||||
settings.protect_disable_force_push_desc=Force-Push auf diesen Branch nicht erlauben.
|
||||
settings.protect_enable_push=Push aktivieren
|
||||
settings.protect_enable_push_desc=Jeder, der Schreibzugriff hat, darf in diesen Branch Pushen (aber kein Force-Push).
|
||||
settings.protect_enable_force_push_all=Force-Push aktivieren
|
||||
settings.protect_enable_force_push_all_desc=Jeder mit Push-Zugriff wird in diesen Branch force-pushen können.
|
||||
settings.protect_enable_force_push_allowlist=Force-Push beschränkt auf Genehmigungsliste
|
||||
settings.protect_enable_force_push_allowlist_desc=Nur Benutzer oder Teams auf der Genehmigungsliste mit Push-Zugriff werden in diesen Branch force-pushen können.
|
||||
settings.protect_enable_merge=Merge aktivieren
|
||||
settings.protect_enable_merge_desc=Jeder mit Schreibzugriff darf die Pull-Requests in diesen Branch mergen.
|
||||
settings.protect_whitelist_committers=Genehmigungsliste für eingeschränkten Push
|
||||
settings.protect_whitelist_committers_desc=Jeder, der auf der Genehmigungsliste steht, darf in diesen Branch pushen (aber kein Force-Push).
|
||||
settings.protect_whitelist_deploy_keys=Genehmigungsliste für Deploy-Schlüssel mit Schreibzugriff zum Pushen.
|
||||
settings.protect_whitelist_users=Nutzer, die pushen dürfen:
|
||||
settings.protect_whitelist_teams=Teams, die pushen dürfen:
|
||||
settings.protect_force_push_allowlist_users=Erlaubte Benutzer für Force-Push:
|
||||
settings.protect_force_push_allowlist_teams=Erlaubte Teams für Force-Push:
|
||||
settings.protect_force_push_allowlist_deploy_keys=Genehmigungsliste für Deploy-Schlüssel mit Schreibzugriff zum Force-Push.
|
||||
settings.protect_merge_whitelist_committers=Merge-Genehmigungsliste aktivieren
|
||||
settings.protect_merge_whitelist_committers_desc=Erlaube Nutzern oder Teams auf der Genehmigungsliste Pull-Requests in diesen Branch zu mergen.
|
||||
settings.protect_merge_whitelist_users=Nutzer, die mergen dürfen:
|
||||
settings.protect_merge_whitelist_teams=Teams, die mergen dürfen:
|
||||
settings.protect_check_status_contexts=Statusprüfungen aktivieren
|
||||
settings.protect_status_check_patterns=Statuscheck-Muster:
|
||||
settings.protect_status_check_patterns_desc=Gib Muster ein, um festzulegen, welche Statusüberprüfungen durchgeführt werden müssen, bevor Branches in einen Branch, der dieser Regel entspricht, gemerged werden können. Jede Zeile gibt ein Muster an. Muster dürfen nicht leer sein.
|
||||
settings.protect_check_status_contexts_desc=Vor dem Mergen müssen Statusprüfungen bestanden werden. Wähle aus, welche Statusprüfungen erfolgreich durchgeführt werden müssen, bevor Branches in einen anderen gemergt werden können, der dieser Regel entspricht. Wenn aktiviert, müssen Commits zuerst auf einen anderen Branch gepusht werden, dann nach bestandener Statusprüfung gemergt oder direkt auf einen Branch gepusht werden, der dieser Regel entspricht. Wenn kein Kontext ausgewählt ist, muss der letzte Commit unabhängig vom Kontext erfolgreich sein.
|
||||
settings.protect_check_status_contexts_list=Statusprüfungen, die in der letzten Woche für dieses Repository gefunden wurden
|
||||
settings.protect_status_check_matched=Übereinstimmung
|
||||
settings.protect_invalid_status_check_pattern=Ungültiges Muster: "%s".
|
||||
settings.protect_no_valid_status_check_patterns=Keine gültigen Statuscheck-Muster.
|
||||
settings.protect_required_approvals=Erforderliche Zustimmungen:
|
||||
settings.protect_required_approvals_desc=Erlaube das Mergen des Pull-Requests nur mit genügend Genehmigungen.
|
||||
settings.protect_approvals_whitelist_enabled=Genehmigungen auf Benutzer oder Teams auf der Genehmigungsliste beschränken
|
||||
settings.protect_approvals_whitelist_enabled_desc=Nur Bewertungen von Benutzern auf der Genehmigungsliste oder Teams zählen zu den erforderlichen Genehmigungen. Gibt es keine Genehmigungsliste, so zählen Reviews von jedem mit Schreibzugriff zu den erforderlichen Genehmigungen.
|
||||
settings.protect_approvals_whitelist_users=Freigeschaltete Reviewer:
|
||||
settings.protect_approvals_whitelist_teams=Freigeschaltete Teams:
|
||||
settings.dismiss_stale_approvals=Entferne alte Genehmigungen
|
||||
settings.dismiss_stale_approvals_desc=Wenn neue Commits gepusht werden, die den Inhalt des Pull-Requests ändern, werden alte Genehmigungen entfernt.
|
||||
settings.ignore_stale_approvals=Veraltete Genehmigungen ignorieren
|
||||
@ -2322,12 +2463,18 @@ settings.ignore_stale_approvals_desc=Genehmigungen, die für ältere Commits ert
|
||||
settings.require_signed_commits=Signierte Commits erforderlich
|
||||
settings.require_signed_commits_desc=Pushes auf diesen Branch ablehnen, wenn Commits nicht signiert oder nicht überprüfbar sind.
|
||||
settings.protect_branch_name_pattern=Muster für geschützte Branchnamen
|
||||
settings.protect_branch_name_pattern_desc=Geschützte Branch-Namensmuster. Siehe <a href="%s">die Dokumentation</a> für die Pattern-Syntax. Beispiele: main, release/**
|
||||
settings.protect_patterns=Muster
|
||||
settings.protect_protected_file_patterns=Geschützte Dateimuster (durch Semikolon ';' getrennt):
|
||||
settings.protect_protected_file_patterns_desc=Geschützte Dateien dürfen nicht direkt geändert werden, auch wenn der Benutzer Rechte hat, Dateien in diesem Branch hinzuzufügen, zu bearbeiten oder zu löschen. Mehrere Muster können mit Semikolon (';') getrennt werden. Siehe <a href='%[1]s'>%[2]s</a> Dokumentation zur Pattern-Syntax. Beispiele: <code>.drone.yml</code>, <code>/docs/**/*.txt</code>.
|
||||
settings.protect_unprotected_file_patterns=Ungeschützte Dateimuster (durch Semikolon ';' getrennt):
|
||||
settings.protect_unprotected_file_patterns_desc=Ungeschützte Dateien, die direkt geändert werden dürfen, wenn der Benutzer Schreibzugriff hat, können die Push-Beschränkung umgehen. Mehrere Muster können mit Semikolon (';') getrennt werden. Siehe <a href='%[1]s'>%[2]s</a> Dokumentation zur Mustersyntax. Beispiele: <code>.drone.yml</code>, <code>/docs/**/*.txt</code>.
|
||||
settings.add_protected_branch=Schutz aktivieren
|
||||
settings.delete_protected_branch=Schutz deaktivieren
|
||||
settings.update_protect_branch_success=Branchschutzregel "%s" wurde geändert.
|
||||
settings.remove_protected_branch_success=Branchschutzregel "%s" wurde deaktiviert.
|
||||
settings.remove_protected_branch_failed=Entfernen der Branchschutzregel "%s" fehlgeschlagen.
|
||||
settings.protected_branch_deletion=Branch-Schutz deaktivieren
|
||||
settings.protected_branch_deletion_desc=Wenn du den Branch-Schutz deaktivierst, können alle Nutzer mit Schreibrechten auf den Branch pushen. Fortfahren?
|
||||
settings.block_rejected_reviews=Merge bei abgelehnten Reviews blockieren
|
||||
settings.block_rejected_reviews_desc=Mergen ist nicht möglich, wenn Änderungen durch offizielle Reviewer angefragt werden, auch wenn es genügend Zustimmungen gibt.
|
||||
@ -2335,8 +2482,11 @@ settings.block_on_official_review_requests=Mergen bei offiziellen Review-Anfrage
|
||||
settings.block_on_official_review_requests_desc=Mergen ist nicht möglich wenn offizielle Review-Anfrangen vorliegen, selbst wenn es genügend Zustimmungen gibt.
|
||||
settings.block_outdated_branch=Merge blockieren, wenn der Pull-Request veraltet ist
|
||||
settings.block_outdated_branch_desc=Mergen ist nicht möglich, wenn der Head-Branch hinter dem Basis-Branch ist.
|
||||
settings.block_admin_merge_override=Administratoren müssen die Schutzregeln für Branches befolgen
|
||||
settings.block_admin_merge_override_desc=Administratoren müssen die Schutzregeln für Branches befolgen und können sie nicht umgehen.
|
||||
settings.default_branch_desc=Wähle einen Standardbranch für Pull-Requests und Code-Commits:
|
||||
settings.merge_style_desc=Merge-Styles
|
||||
settings.default_merge_style_desc=Standard-Mergeverhalten für Pull-Requests
|
||||
settings.choose_branch=Branch wählen…
|
||||
settings.no_protected_branch=Es gibt keine geschützten Branches.
|
||||
settings.edit_protected_branch=Bearbeiten
|
||||
@ -2352,12 +2502,25 @@ settings.tags.protection.allowed.teams=Erlaubte Teams
|
||||
settings.tags.protection.allowed.noone=Niemand
|
||||
settings.tags.protection.create=Tag schützen
|
||||
settings.tags.protection.none=Es gibt keine geschützten Tags.
|
||||
settings.tags.protection.pattern.description=Du kannst einen einzigen Namen oder ein globales Schema oder einen regulären Ausdruck verwenden, um mehrere Tags zu schützen. Mehr dazu im <a target="_blank" rel="noopener" href="%s">Guide für geschützte Tags (Englisch)</a>.
|
||||
settings.bot_token=Bot-Token
|
||||
settings.chat_id=Chat-ID
|
||||
settings.thread_id=Thread-ID
|
||||
settings.matrix.homeserver_url=Homeserver-URL
|
||||
settings.matrix.room_id=Raum-ID
|
||||
settings.matrix.message_type=Nachrichtentyp
|
||||
settings.visibility.private.button=Auf privat setzen
|
||||
settings.visibility.private.text=Das Ändern der Sichtbarkeit auf privat wird das Repository nicht nur für erlaubte Mitglieder sichtbar machen, sondern kann auch die Beziehung zwischen ihm und Forks, Beobachtern und Sternen entfernen.
|
||||
settings.visibility.private.bullet_title=<strong>Das Ändern der Sichtbarkeit auf privat wird:</strong>
|
||||
settings.visibility.private.bullet_one=Das Repository nur für zugelassene Mitglieder sichtbar machen.
|
||||
settings.visibility.private.bullet_two=Kann die Beziehung zwischen ihm und <strong>Forks</strong>, <strong>Beobachtern</strong>und <strong>Sternen</strong> entfernen.
|
||||
settings.visibility.public.button=Auf öffentlich setzen
|
||||
settings.visibility.public.text=Das Ändern der Sichtbarkeit auf öffentlich macht das Repository für jeden sichtbar.
|
||||
settings.visibility.public.bullet_title=<strong>Das Ändern der Sichtbarkeit auf öffentlich wird:</strong>
|
||||
settings.visibility.public.bullet_one=Das Repository für jeden sichtbar machen.
|
||||
settings.visibility.success=Die Sichtbarkeit des Repositorys wurde geändert.
|
||||
settings.visibility.error=Beim Versuch, die Sichtbarkeit des Repositorys zu ändern, ist ein Fehler aufgetreten.
|
||||
settings.visibility.fork_error=Die Sichtbarkeit von geforkten Repositories ist nicht veränderbar.
|
||||
settings.archive.button=Repo archivieren
|
||||
settings.archive.header=Dieses Repo archivieren
|
||||
settings.archive.text=Durch das Archivieren wird ein Repo vollständig schreibgeschützt. Es wird vom Dashboard versteckt. Niemand (nicht einmal du!) wird in der Lage sein, neue Commits zu erstellen oder Issues oder Pull-Requests zu öffnen.
|
||||
@ -2469,6 +2632,7 @@ release.new_release=Neues Release
|
||||
release.draft=Entwurf
|
||||
release.prerelease=Pre-Release
|
||||
release.stable=Stabil
|
||||
release.latest=Aktuell
|
||||
release.compare=Vergleichen
|
||||
release.edit=bearbeiten
|
||||
release.ahead.commits=<strong>%d</strong> Commits
|
||||
@ -2553,6 +2717,7 @@ tag.create_success=Tag "%s" wurde erstellt.
|
||||
|
||||
topic.manage_topics=Themen verwalten
|
||||
topic.done=Fertig
|
||||
topic.count_prompt=Du kannst nicht mehr als 25 Themen auswählen
|
||||
topic.format_prompt=Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) und Punkte ('.') enthalten und bis zu 35 Zeichen lang sein. Nur Kleinbuchstaben sind zulässig.
|
||||
|
||||
find_file.go_to_file=Datei suchen
|
||||
@ -2650,6 +2815,7 @@ teams.leave.detail=%s verlassen?
|
||||
teams.can_create_org_repo=Repositories erstellen
|
||||
teams.can_create_org_repo_helper=Mitglieder können neue Repositories in der Organisation erstellen. Der Ersteller erhält Administrator-Zugriff auf das neue Repository.
|
||||
teams.none_access=Kein Zugriff
|
||||
teams.none_access_helper=Mitglieder können keine anderen Aktionen für diese Einheit anzeigen oder durchführen. Dies hat keine Wirkung auf öffentliche Repositories.
|
||||
teams.general_access=Allgemeiner Zugriff
|
||||
teams.general_access_helper=Mitgliederberechtigungen werden durch folgende Berechtigungstabelle festgelegt.
|
||||
teams.read_access=Lesen
|
||||
@ -2696,6 +2862,7 @@ teams.invite.by=Von %s eingeladen
|
||||
teams.invite.description=Bitte klicke auf die folgende Schaltfläche, um dem Team beizutreten.
|
||||
|
||||
[admin]
|
||||
maintenance=Wartung
|
||||
dashboard=Dashboard
|
||||
self_check=Selbstprüfung
|
||||
identity_access=Identität & Zugriff
|
||||
@ -2717,7 +2884,9 @@ last_page=Letzte
|
||||
total=Gesamt: %d
|
||||
settings=Administratoreinstellungen
|
||||
|
||||
dashboard.new_version_hint=Gitea %s ist jetzt verfügbar, deine derzeitige Version ist %s. Weitere Details findest du im <a target="_blank" rel="noreferrer" href="%s">Blog</a>.
|
||||
dashboard.statistic=Übersicht
|
||||
dashboard.maintenance_operations=Wartungsoperationen
|
||||
dashboard.system_status=System-Status
|
||||
dashboard.operation_name=Name der Operation
|
||||
dashboard.operation_switch=Wechseln
|
||||
@ -2758,6 +2927,7 @@ dashboard.reinit_missing_repos=Alle Git-Repositories neu einlesen, für die Eint
|
||||
dashboard.sync_external_users=Externe Benutzerdaten synchronisieren
|
||||
dashboard.cleanup_hook_task_table=Hook-Task-Tabelle bereinigen
|
||||
dashboard.cleanup_packages=Veraltete Pakete löschen
|
||||
dashboard.cleanup_actions=Abgelaufene Ressourcen von Actions bereinigen
|
||||
dashboard.server_uptime=Server-Uptime
|
||||
dashboard.current_goroutine=Aktuelle Goroutinen
|
||||
dashboard.current_memory_usage=Aktuelle Speichernutzung
|
||||
@ -2787,12 +2957,19 @@ dashboard.total_gc_time=Gesamte GC-Pause
|
||||
dashboard.total_gc_pause=Gesamte GC-Pause
|
||||
dashboard.last_gc_pause=Letzte GC-Pause
|
||||
dashboard.gc_times=Anzahl GC
|
||||
dashboard.delete_old_actions=Alle alten Aktionen aus der Datenbank löschen
|
||||
dashboard.delete_old_actions.started=Löschen aller alten Aktionen in der Datenbank gestartet.
|
||||
dashboard.update_checker=Update-Checker
|
||||
dashboard.delete_old_system_notices=Alle alten Systemmeldungen aus der Datenbank löschen
|
||||
dashboard.gc_lfs=Garbage-Collection für LFS Meta-Objekte ausführen
|
||||
dashboard.stop_zombie_tasks=Zombie-Aufgaben stoppen
|
||||
dashboard.stop_endless_tasks=Endlose Aktionen stoppen
|
||||
dashboard.cancel_abandoned_jobs=Aufgegebene Jobs abbrechen
|
||||
dashboard.start_schedule_tasks=Terminierte Aufgaben starten
|
||||
dashboard.sync_branch.started=Synchronisierung der Branches gestartet
|
||||
dashboard.sync_tag.started=Tag-Synchronisierung gestartet
|
||||
dashboard.rebuild_issue_indexer=Issue-Indexer neu bauen
|
||||
dashboard.sync_repo_licenses=Repo-Lizenzen synchronisieren
|
||||
|
||||
users.user_manage_panel=Benutzerkontenverwaltung
|
||||
users.new_account=Benutzerkonto erstellen
|
||||
@ -2864,6 +3041,10 @@ emails.not_updated=Fehler beim Aktualisieren der angeforderten E-Mail-Adresse: %
|
||||
emails.duplicate_active=Diese E-Mail-Adresse wird bereits von einem Nutzer verwendet.
|
||||
emails.change_email_header=E-Mail-Eigenschaften aktualisieren
|
||||
emails.change_email_text=Bist du dir sicher, dass du diese E-Mail-Adresse aktualisieren möchtest?
|
||||
emails.delete=E-Mail löschen
|
||||
emails.delete_desc=Willst du diese E-Mail-Adresse wirklich löschen?
|
||||
emails.deletion_success=Die E-Mail-Adresse wurde gelöscht.
|
||||
emails.delete_primary_email_error=Du kannst die primäre E-Mail-Adresse nicht löschen.
|
||||
|
||||
orgs.org_manage_panel=Organisationsverwaltung
|
||||
orgs.name=Name
|
||||
@ -2896,10 +3077,12 @@ packages.size=Größe
|
||||
packages.published=Veröffentlicht
|
||||
|
||||
defaulthooks=Standard-Webhooks
|
||||
defaulthooks.desc=Webhooks senden automatisch eine HTTP-POST-Anfrage an einen Server, wenn bestimmte Gitea-Events ausgelöst werden. Hier definierte Webhooks sind die Standardwerte, die in alle neuen Repositories kopiert werden. Mehr Infos findest du in der <a target="_blank" rel="noopener" href="%s">Webhooks-Anleitung</a> (auf Englisch).
|
||||
defaulthooks.add_webhook=Standard-Webhook hinzufügen
|
||||
defaulthooks.update_webhook=Standard-Webhook aktualisieren
|
||||
|
||||
systemhooks=System-Webhooks
|
||||
systemhooks.desc=Webhooks senden automatisch HTTP-POST-Anfragen an einen Server, wenn bestimmte Gitea-Events ausgelöst werden. Hier definierte Webhooks werden auf alle Repositories des Systems übertragen, beachte daher mögliche Performance-Einbrüche. Mehr Infos findest du in der <a target="_blank" rel="noopener" href="%s">Webhooks-Anleitung</a> (auf Englisch).
|
||||
systemhooks.add_webhook=System-Webhook hinzufügen
|
||||
systemhooks.update_webhook=System-Webhook aktualisieren
|
||||
|
||||
@ -2994,7 +3177,18 @@ auths.tips=Tipps
|
||||
auths.tips.oauth2.general=OAuth2-Authentifizierung
|
||||
auths.tips.oauth2.general.tip=Beim Registrieren einer OAuth2-Anwendung sollte die Callback-URL folgendermaßen lauten:
|
||||
auths.tip.oauth2_provider=OAuth2-Anbieter
|
||||
auths.tip.bitbucket=Registriere einen neuen OAuth-Consumer unter %s und füge die Berechtigung 'Account' - 'Read' hinzu
|
||||
auths.tip.nextcloud=Registriere über das "Settings -> Security -> OAuth 2.0 client"-Menü einen neuen "OAuth consumer" auf der Nextcloud-Instanz
|
||||
auths.tip.dropbox=Erstelle eine neue App auf %s
|
||||
auths.tip.facebook=Erstelle eine neue Anwendung auf %s und füge das Produkt "Facebook Login“ hinzu
|
||||
auths.tip.github=Erstelle unter %s eine neue OAuth-Anwendung
|
||||
auths.tip.gitlab_new=Erstelle eine neue Anwendung unter %s
|
||||
auths.tip.google_plus=Du erhältst die OAuth2-Client-Zugangsdaten in der Google-API-Konsole unter %s
|
||||
auths.tip.openid_connect=Benutze die OpenID-Connect-Discovery-URL "https://{server}/.well-known/openid-configuration", um die Endpunkte zu spezifizieren
|
||||
auths.tip.twitter=Gehe zu %s, erstelle eine Anwendung und stelle sicher, dass die Option „Allow this application to be used to Sign in with Twitter“ aktiviert ist
|
||||
auths.tip.discord=Erstelle unter %s eine neue Anwendung
|
||||
auths.tip.gitea=Registriere eine neue OAuth2-Anwendung. Eine Anleitung findest du unter %s
|
||||
auths.tip.yandex=`Erstelle eine neue Anwendung auf %s. Wähle folgende Berechtigungen aus dem "Yandex.Passport API" Bereich: "Zugriff auf E-Mail-Adresse", "Zugriff auf Benutzeravatar" und "Zugriff auf Benutzername, Vor- und Nachname, Geschlecht"`
|
||||
auths.tip.mastodon=Gebe eine benutzerdefinierte URL für die Mastodon-Instanz ein, mit der du dich authentifizieren möchtest (oder benutze die standardmäßige)
|
||||
auths.edit=Authentifikationsquelle bearbeiten
|
||||
auths.activated=Diese Authentifikationsquelle ist aktiviert
|
||||
@ -3110,6 +3304,10 @@ config.cache_adapter=Cache-Adapter
|
||||
config.cache_interval=Cache-Intervall
|
||||
config.cache_conn=Cache-Anbindung
|
||||
config.cache_item_ttl=Cache Item-TTL
|
||||
config.cache_test=Cache testen
|
||||
config.cache_test_failed=Fehler beim Prüfen des Caches: %v.
|
||||
config.cache_test_slow=Cache-Test erfolgreich, aber die Antwortzeit ist langsam: %s.
|
||||
config.cache_test_succeeded=Cache-Test erfolgreich, Antwort in %s erhalten.
|
||||
|
||||
config.session_config=Session-Konfiguration
|
||||
config.session_provider=Session-Provider
|
||||
@ -3156,6 +3354,7 @@ monitor.next=Nächste Ausführung
|
||||
monitor.previous=Letzte Ausführung
|
||||
monitor.execute_times=Ausführungen
|
||||
monitor.process=Laufende Prozesse
|
||||
monitor.stacktrace=Stacktraces
|
||||
monitor.processes_count=%d Prozesse
|
||||
monitor.download_diagnosis_report=Diagnosebericht herunterladen
|
||||
monitor.desc=Beschreibung
|
||||
@ -3163,6 +3362,8 @@ monitor.start=Startzeit
|
||||
monitor.execute_time=Ausführungszeit
|
||||
monitor.last_execution_result=Ergebnis
|
||||
monitor.process.cancel=Prozess abbrechen
|
||||
monitor.process.cancel_desc=Abbrechen eines Prozesses kann Datenverlust verursachen
|
||||
monitor.process.cancel_notices=Abbrechen: <strong>%s</strong>?
|
||||
monitor.process.children=Subprozesse
|
||||
|
||||
monitor.queues=Warteschlangen
|
||||
@ -3201,11 +3402,13 @@ notices.op=Aktion
|
||||
notices.delete_success=Diese Systemmeldung wurde gelöscht.
|
||||
|
||||
self_check.no_problem_found=Bisher wurde kein Problem festgestellt.
|
||||
self_check.startup_warnings=Warnungen beim Start:
|
||||
self_check.database_collation_mismatch=Erwarte Datenbank-Kollation: %s
|
||||
self_check.database_collation_case_insensitive=Die Datenbank verwendet die Kollation %s, was eine unsensible Kollation ist. Obwohl Gitea damit arbeiten könnte, gibt es vielleicht einige seltene Fälle, die nicht wie erwartet funktionieren.
|
||||
self_check.database_inconsistent_collation_columns=Die Datenbank verwendet die Kollation %s, aber diese Spalten verwenden unzutreffende Kollationen. Dies könnte zu unerwarteten Problemen führen.
|
||||
self_check.database_fix_mysql=Für MySQL/MariaDB-Benutzer kann man den Befehl "gitea doctor convert" oder manuell auch "ALTER ... COLLATE ..."-SQLs verwenden, um die Sortierprobleme zu beheben.
|
||||
self_check.database_fix_mssql=Für MSSQL-Benutzer kann das Problem im Moment nur durch "ALTER ... COLLATE ..." SQLs manuell behoben werden.
|
||||
self_check.location_origin_mismatch=Aktuelle URL (%[1]s) stimmt nicht mit der URL überein, die Gitea (%[2]s) sieht. Wenn du einen Reverse-Proxy verwendest, stelle bitte sicher, dass die Header "Host" und "X-Forwarded-Proto" korrekt gesetzt sind.
|
||||
|
||||
[action]
|
||||
create_repo=hat das Repository <a href="%s">%s</a> erstellt
|
||||
@ -3233,6 +3436,7 @@ mirror_sync_create=neue Referenz <a href="%[2]s">%[3]s</a> bei <a href="%[1]s">%
|
||||
mirror_sync_delete=hat die Referenz des Mirrors <code>%[2]s</code> in <a href="%[1]s">%[3]s</a> synchronisiert und gelöscht
|
||||
approve_pull_request=`hat <a href="%[1]s">%[3]s#%[2]s</a> approved`
|
||||
reject_pull_request=`schlug Änderungen für <a href="%[1]s">%[3]s#%[2]s</a> vor`
|
||||
publish_release=`veröffentlichte Release <a href="%[2]s"> "%[4]s" </a> in <a href="%[1]s">%[3]s</a>`
|
||||
review_dismissed=`verwarf das Review von <b>%[4]s</b> in <a href="%[1]s">%[3]s#%[2]s</a>`
|
||||
review_dismissed_reason=Grund:
|
||||
create_branch=legte den Branch <a href="%[2]s">%[3]s</a> in <a href="%[1]s">%[4]s</a> an
|
||||
@ -3261,6 +3465,8 @@ raw_minutes=Minuten
|
||||
|
||||
[dropzone]
|
||||
default_message=Zum Hochladen hier klicken oder Datei ablegen.
|
||||
invalid_input_type=Dateien dieses Dateityps können nicht hochgeladen werden.
|
||||
file_too_big=Dateigröße ({{filesize}} MB) überschreitet die Maximalgröße ({{maxFilesize}} MB).
|
||||
remove_file=Datei entfernen
|
||||
|
||||
[notification]
|
||||
@ -3297,6 +3503,7 @@ error.unit_not_allowed=Du hast keine Berechtigung, um auf diesen Repository-Bere
|
||||
title=Pakete
|
||||
desc=Repository-Pakete verwalten.
|
||||
empty=Noch keine Pakete vorhanden.
|
||||
no_metadata=Keine Metadaten.
|
||||
empty.documentation=Weitere Informationen zur Paket-Registry findest Du in der <a target="_blank" rel="noopener noreferrer" href="%s">Dokumentation</a>.
|
||||
empty.repo=Hast du ein Paket hochgeladen, das hier nicht angezeigt wird? Gehe zu den <a href="%[1]s">Paketeinstellungen</a> und verlinke es mit diesem Repo.
|
||||
registry.documentation=Für weitere Informationen zur %s-Registry, schaue in der <a target="_blank" rel="noopener noreferrer" href="%s">Dokumentation</a> nach.
|
||||
@ -3331,6 +3538,8 @@ alpine.repository=Repository-Informationen
|
||||
alpine.repository.branches=Branches
|
||||
alpine.repository.repositories=Repositories
|
||||
alpine.repository.architectures=Architekturen
|
||||
arch.registry=Server mit gebrauchtem Repository und Architektur zu <code>/etc/pacman.conf</code> hinzufügen:
|
||||
arch.install=Paket mit pacman synchronisieren:
|
||||
arch.repository=Repository-Informationen
|
||||
arch.repository.repositories=Repositories
|
||||
arch.repository.architectures=Architekturen
|
||||
@ -3381,6 +3590,7 @@ npm.install=Um das Paket mit npm zu installieren, führe den folgenden Befehl au
|
||||
npm.install2=oder füge es zur package.json-Datei hinzu:
|
||||
npm.dependencies=Abhängigkeiten
|
||||
npm.dependencies.development=Entwicklungsabhängigkeiten
|
||||
npm.dependencies.bundle=Gebündelte Abhängigkeiten
|
||||
npm.dependencies.peer=Peer Abhängigkeiten
|
||||
npm.dependencies.optional=Optionale Abhängigkeiten
|
||||
npm.details.tag=Tag
|
||||
@ -3512,6 +3722,7 @@ runners.status.active=Aktiv
|
||||
runners.status.offline=Offline
|
||||
runners.version=Version
|
||||
runners.reset_registration_token=Registrierungs-Token zurücksetzen
|
||||
runners.reset_registration_token_confirm=Möchtest du den aktuellen Token invalidieren und einen neuen generieren?
|
||||
runners.reset_registration_token_success=Runner-Registrierungstoken erfolgreich zurückgesetzt
|
||||
|
||||
runs.all_workflows=Alle Workflows
|
||||
@ -3521,6 +3732,7 @@ runs.pushed_by=gepusht von
|
||||
runs.invalid_workflow_helper=Die Workflow-Konfigurationsdatei ist ungültig. Bitte überprüfe Deine Konfigurationsdatei: %s
|
||||
runs.no_matching_online_runner_helper=Kein passender Runner online mit Label: %s
|
||||
runs.no_job_without_needs=Der Workflow muss mindestens einen Job ohne Abhängigkeiten enthalten.
|
||||
runs.no_job=Der Workflow muss mindestens einen Job enthalten
|
||||
runs.actor=Initiator
|
||||
runs.status=Status
|
||||
runs.actors_no_select=Alle Initiatoren
|
||||
@ -3531,12 +3743,18 @@ runs.no_workflows.quick_start=Du weißt nicht, wie du mit Gitea Actions loslegst
|
||||
runs.no_workflows.documentation=Weitere Informationen zu Gitea Actions findest du in der <a target="_blank" rel="noopener noreferrer" href="%s"> Dokumentation</a>.
|
||||
runs.no_runs=Der Workflow hat noch keine Ausführungen.
|
||||
runs.empty_commit_message=(leere Commit-Nachricht)
|
||||
runs.expire_log_message=Protokolle wurden geleert, weil sie zu alt waren.
|
||||
|
||||
workflow.disable=Workflow deaktivieren
|
||||
workflow.disable_success=Workflow '%s' erfolgreich deaktiviert.
|
||||
workflow.enable=Workflow aktivieren
|
||||
workflow.enable_success=Workflow '%s' erfolgreich aktiviert.
|
||||
workflow.disabled=Workflow ist deaktiviert.
|
||||
workflow.run=Workflow ausführen
|
||||
workflow.not_found=Workflow '%s' wurde nicht gefunden.
|
||||
workflow.run_success=Workflow '%s' erfolgreich ausgeführt.
|
||||
workflow.from_ref=Nutze Workflow von
|
||||
workflow.has_workflow_dispatch=Dieser Workflow hat einen workflow_dispatch Event-Trigger.
|
||||
|
||||
need_approval_desc=Um Workflows für den Pull-Request eines Forks auszuführen, ist eine Genehmigung erforderlich.
|
||||
|
||||
@ -3556,8 +3774,11 @@ variables.creation.success=Die Variable „%s“ wurde hinzugefügt.
|
||||
variables.update.failed=Fehler beim Bearbeiten der Variable.
|
||||
variables.update.success=Die Variable wurde bearbeitet.
|
||||
|
||||
logs.always_auto_scroll=Autoscroll für Logs immer aktivieren
|
||||
logs.always_expand_running=Laufende Logs immer erweitern
|
||||
|
||||
[projects]
|
||||
deleted.display_name=Gelöschtes Projekt
|
||||
type-1.display_name=Individuelles Projekt
|
||||
type-2.display_name=Repository-Projekt
|
||||
type-3.display_name=Organisationsprojekt
|
||||
|
@ -580,6 +580,7 @@ joined_on=Εγγράφηκε την %s
|
||||
repositories=Αποθετήρια
|
||||
activity=Δημόσια Δραστηριότητα
|
||||
followers=Ακόλουθοι
|
||||
show_more=Εμφάνιση Περισσότερων
|
||||
starred=Αγαπημένα Αποθετήρια
|
||||
watched=Ακολουθούμενα Αποθετήρια
|
||||
code=Κώδικας
|
||||
|
@ -649,6 +649,7 @@ joined_on = Joined on %s
|
||||
repositories = Repositories
|
||||
activity = Public Activity
|
||||
followers = Followers
|
||||
show_more = Show More
|
||||
starred = Starred Repositories
|
||||
watched = Watched Repositories
|
||||
code = Code
|
||||
|
@ -577,6 +577,7 @@ joined_on=Se unió el %s
|
||||
repositories=Repositorios
|
||||
activity=Actividad pública
|
||||
followers=Seguidores
|
||||
show_more=Ver más
|
||||
starred=Repositorios Favoritos
|
||||
watched=Repositorios seguidos
|
||||
code=Código
|
||||
|
@ -463,6 +463,7 @@ change_avatar=تغییر آواتار…
|
||||
repositories=مخازن
|
||||
activity=فعالیت های عمومی
|
||||
followers=دنبال کنندگان
|
||||
show_more=نمایش بیشتر
|
||||
starred=مخان ستاره دار
|
||||
watched=مخازنی که دنبال میشوند
|
||||
projects=پروژهها
|
||||
|
@ -649,6 +649,7 @@ joined_on=Inscrit le %s
|
||||
repositories=Dépôts
|
||||
activity=Activité publique
|
||||
followers=abonnés
|
||||
show_more=Voir plus
|
||||
starred=Dépôts favoris
|
||||
watched=Dépôts surveillés
|
||||
code=Code
|
||||
|
@ -649,6 +649,7 @@ joined_on=Cláraigh ar %s
|
||||
repositories=Stórais
|
||||
activity=Gníomhaíocht Phoiblí
|
||||
followers=Leantóirí
|
||||
show_more=Taispeáin Tuilleadh
|
||||
starred=Stórais Réaltaithe
|
||||
watched=Stórais Breathnaithe
|
||||
code=Cód
|
||||
@ -1945,6 +1946,8 @@ pulls.delete.title=Scrios an t-iarratas tarraingthe seo?
|
||||
pulls.delete.text=An bhfuil tú cinnte gur mhaith leat an t-iarratas tarraingthe seo a scriosadh? (Bainfidh sé seo an t-inneachar go léir go buan. Smaoinigh ar é a dhúnadh ina ionad sin, má tá sé i gceist agat é a choinneáil i gcartlann)
|
||||
|
||||
pulls.recently_pushed_new_branches=Bhrúigh tú ar bhrainse <strong>%[1]s</strong> %[2]s
|
||||
pulls.upstream_diverging_prompt_behind_1=Tá an brainse seo %[1]d tiomantas taobh thiar de %[2]s
|
||||
pulls.upstream_diverging_prompt_behind_n=Tá an brainse seo %[1]d geallta taobh thiar de %[2]s
|
||||
pulls.upstream_diverging_prompt_base_newer=Tá athruithe nua ar an mbunbhrainse %s
|
||||
pulls.upstream_diverging_merge=Forc sionc
|
||||
|
||||
@ -3719,6 +3722,7 @@ runners.status.active=Gníomhach
|
||||
runners.status.offline=As líne
|
||||
runners.version=Leagan
|
||||
runners.reset_registration_token=Athshocraigh comhartha clár
|
||||
runners.reset_registration_token_confirm=Ar mhaith leat an comhartha reatha a neamhbhailiú agus ceann nua a ghiniúint?
|
||||
runners.reset_registration_token_success=D'éirigh le hathshocrú comhartha clárúcháin an dara háit
|
||||
|
||||
runs.all_workflows=Gach Sreafaí Oibre
|
||||
@ -3770,6 +3774,8 @@ variables.creation.success=Tá an athróg "%s" curtha leis.
|
||||
variables.update.failed=Theip ar athróg a chur in eagar.
|
||||
variables.update.success=Tá an t-athróg curtha in eagar.
|
||||
|
||||
logs.always_auto_scroll=Logchomhaid scrollaithe uathoibríoch i gcónaí
|
||||
logs.always_expand_running=Leathnaigh logs reatha i gcónaí
|
||||
|
||||
[projects]
|
||||
deleted.display_name=Tionscadal scriosta
|
||||
|
@ -488,6 +488,7 @@ change_avatar=Modifica il tuo avatar…
|
||||
repositories=Repository
|
||||
activity=Attività pubblica
|
||||
followers=Seguaci
|
||||
show_more=Mostra Altro
|
||||
starred=Repositories votate
|
||||
watched=Repository Osservate
|
||||
projects=Progetti
|
||||
|
@ -649,6 +649,7 @@ joined_on=%sに登録
|
||||
repositories=リポジトリ
|
||||
activity=公開アクティビティ
|
||||
followers=フォロワー
|
||||
show_more=さらに表示
|
||||
starred=スター付きリポジトリ
|
||||
watched=ウォッチ中リポジトリ
|
||||
code=コード
|
||||
|
@ -583,6 +583,7 @@ joined_on=Pievienojās %s
|
||||
repositories=Repozitoriji
|
||||
activity=Publiskā aktivitāte
|
||||
followers=Sekotāji
|
||||
show_more=Rādīt vairāk
|
||||
starred=Atzīmēti repozitoriji
|
||||
watched=Vērotie repozitoriji
|
||||
code=Kods
|
||||
|
@ -487,6 +487,7 @@ change_avatar=Wijzig je profielfoto…
|
||||
repositories=repositories
|
||||
activity=Openbare activiteit
|
||||
followers=Volgers
|
||||
show_more=Meer weergeven
|
||||
starred=Repositories met ster
|
||||
watched=Gevolgde repositories
|
||||
projects=Projecten
|
||||
|
@ -582,6 +582,7 @@ joined_on=Inscreveu-se em %s
|
||||
repositories=Repositórios
|
||||
activity=Atividade pública
|
||||
followers=Seguidores
|
||||
show_more=Mostrar mais
|
||||
starred=Repositórios favoritos
|
||||
watched=Repositórios observados
|
||||
code=Código
|
||||
|
@ -649,6 +649,7 @@ joined_on=Inscreveu-se em %s
|
||||
repositories=Repositórios
|
||||
activity=Trabalho público
|
||||
followers=Seguidores
|
||||
show_more=Mostrar mais
|
||||
starred=Repositórios favoritos
|
||||
watched=Repositórios sob vigilância
|
||||
code=Código
|
||||
@ -1921,8 +1922,8 @@ pulls.close=Encerrar pedido de integração
|
||||
pulls.closed_at=`fechou este pedido de integração <a id="%[1]s" href="#%[1]s">%[2]s</a>`
|
||||
pulls.reopened_at=`reabriu este pedido de integração <a id="%[1]s" href="#%[1]s">%[2]s</a>`
|
||||
pulls.cmd_instruction_hint=`Ver <a class="show-instruction">instruções para a linha de comandos</a>.`
|
||||
pulls.cmd_instruction_checkout_title=Conferir
|
||||
pulls.cmd_instruction_checkout_desc=No seu repositório, irá criar um novo ramo para que possa testar as modificações.
|
||||
pulls.cmd_instruction_checkout_title=Checkout
|
||||
pulls.cmd_instruction_checkout_desc=A partir do seu repositório, crie um novo ramo e teste nele as modificações.
|
||||
pulls.cmd_instruction_merge_title=Integrar
|
||||
pulls.cmd_instruction_merge_desc=Integrar as modificações e enviar para o Gitea.
|
||||
pulls.cmd_instruction_merge_warning=Aviso: Esta operação não pode executar pedidos de integração porque "auto-identificar integração manual" não estava habilitado
|
||||
@ -1945,6 +1946,8 @@ pulls.delete.title=Eliminar este pedido de integração?
|
||||
pulls.delete.text=Tem a certeza que quer eliminar este pedido de integração? Isso irá remover todo o conteúdo permanentemente. Como alternativa considere fechá-lo, se pretender mantê-lo em arquivo.
|
||||
|
||||
pulls.recently_pushed_new_branches=Enviou para o ramo <strong>%[1]s</strong> %[2]s
|
||||
pulls.upstream_diverging_prompt_behind_1=Este ramo está %[1]d cometimento atrás de %[2]s
|
||||
pulls.upstream_diverging_prompt_behind_n=Este ramo está %[1]d cometimentos atrás de %[2]s
|
||||
pulls.upstream_diverging_prompt_base_newer=O ramo base %s tem novas modificações
|
||||
pulls.upstream_diverging_merge=Sincronizar derivação
|
||||
|
||||
|
@ -578,6 +578,7 @@ joined_on=Присоединил(ся/ась) %s
|
||||
repositories=Репозитории
|
||||
activity=Активность
|
||||
followers=Подписчики
|
||||
show_more=Показать больше
|
||||
starred=Избранные репозитории
|
||||
watched=Отслеживаемые репозитории
|
||||
code=Код
|
||||
|
@ -452,6 +452,7 @@ change_avatar=ඔබගේ අවතාරය වෙනස් කරන්න…
|
||||
repositories=කෝෂ්ඨ
|
||||
activity=ප්රසිද්ධ ක්රියාකාරකම
|
||||
followers=අනුගාමිකයන්
|
||||
show_more=තව පෙන්වන්න
|
||||
starred=තරු ගබඩාව
|
||||
watched=නරඹන ලද ගබඩාවලදී
|
||||
projects=ව්යාපෘති
|
||||
|
@ -631,6 +631,7 @@ joined_on=%s tarihinde katıldı
|
||||
repositories=Depolar
|
||||
activity=Genel Aktivite
|
||||
followers=Takipçiler
|
||||
show_more=Daha Fazla Göster
|
||||
starred=Yıldızlanmış depolar
|
||||
watched=İzlenen Depolar
|
||||
code=Kod
|
||||
|
@ -466,6 +466,7 @@ change_avatar=Змінити свій аватар…
|
||||
repositories=Репозиторії
|
||||
activity=Публічна активність
|
||||
followers=Читачі
|
||||
show_more=Показати більше
|
||||
starred=Обрані Репозиторії
|
||||
watched=Відстежувані репозиторії
|
||||
projects=Проєкт
|
||||
|
@ -649,6 +649,7 @@ joined_on=加入于 %s
|
||||
repositories=仓库列表
|
||||
activity=公开活动
|
||||
followers=关注者
|
||||
show_more=显示更多
|
||||
starred=已点赞
|
||||
watched=已关注仓库
|
||||
code=代码
|
||||
|
@ -647,6 +647,7 @@ joined_on=加入於 %s
|
||||
repositories=儲存庫
|
||||
activity=公開動態
|
||||
followers=追蹤者
|
||||
show_more=顯示更多
|
||||
starred=已加星號
|
||||
watched=關注的儲存庫
|
||||
code=程式碼
|
||||
|
170
package-lock.json
generated
170
package-lock.json
generated
@ -87,7 +87,7 @@
|
||||
"eslint": "8.57.0",
|
||||
"eslint-import-resolver-typescript": "3.7.0",
|
||||
"eslint-plugin-array-func": "4.0.0",
|
||||
"eslint-plugin-github": "5.1.4",
|
||||
"eslint-plugin-github": "5.0.2",
|
||||
"eslint-plugin-import-x": "4.6.1",
|
||||
"eslint-plugin-no-jquery": "3.1.0",
|
||||
"eslint-plugin-no-use-extend-native": "0.5.0",
|
||||
@ -7953,166 +7953,35 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-github": {
|
||||
"version": "5.1.4",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-5.1.4.tgz",
|
||||
"integrity": "sha512-j5IgIxsDoch06zJzeqPvenfzRXDKI9Z8YwfUg1pm2ay1q44tMSFwvEu6l0uEIrTpA3v8QdPyLr98LqDl1TIhSA==",
|
||||
"version": "5.0.2",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-5.0.2.tgz",
|
||||
"integrity": "sha512-nMdzWJQ5CimjQDY6SFeJ0KIXuNFf0dgDWEd4eP3UWfuTuP/dXcZJDg7MQRvAFt743T1zUi4+/HdOihfu8xJkLA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint/compat": "^1.2.3",
|
||||
"@eslint/eslintrc": "^3.1.0",
|
||||
"@eslint/js": "^9.14.0",
|
||||
"@github/browserslist-config": "^1.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
||||
"@typescript-eslint/parser": "^8.0.0",
|
||||
"aria-query": "^5.3.0",
|
||||
"eslint-config-prettier": ">=8.0.0",
|
||||
"eslint-plugin-escompat": "^3.11.3",
|
||||
"eslint-plugin-escompat": "^3.3.3",
|
||||
"eslint-plugin-eslint-comments": "^3.2.0",
|
||||
"eslint-plugin-filenames": "^1.3.2",
|
||||
"eslint-plugin-i18n-text": "^1.0.1",
|
||||
"eslint-plugin-import": "^2.25.2",
|
||||
"eslint-plugin-jsx-a11y": "^6.7.1",
|
||||
"eslint-plugin-no-only-tests": "^3.0.0",
|
||||
"eslint-plugin-prettier": "^5.2.1",
|
||||
"eslint-plugin-prettier": "^5.0.0",
|
||||
"eslint-rule-documentation": ">=1.0.0",
|
||||
"globals": "^15.12.0",
|
||||
"jsx-ast-utils": "^3.3.2",
|
||||
"prettier": "^3.0.0",
|
||||
"svg-element-attributes": "^1.3.1",
|
||||
"typescript-eslint": "^8.14.0"
|
||||
"svg-element-attributes": "^1.3.1"
|
||||
},
|
||||
"bin": {
|
||||
"eslint-ignore-errors": "bin/eslint-ignore-errors.js"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^8 || ^9"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-github/node_modules/@eslint/compat": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-1.2.4.tgz",
|
||||
"integrity": "sha512-S8ZdQj/N69YAtuqFt7653jwcvuUj131+6qGLUyDqfDg1OIoBQ66OCuXC473YQfO2AaxITTutiRQiDwoo7ZLYyg==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^9.10.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"eslint": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-github/node_modules/@eslint/eslintrc": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz",
|
||||
"integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ajv": "^6.12.4",
|
||||
"debug": "^4.3.2",
|
||||
"espree": "^10.0.1",
|
||||
"globals": "^14.0.0",
|
||||
"ignore": "^5.2.0",
|
||||
"import-fresh": "^3.2.1",
|
||||
"js-yaml": "^4.1.0",
|
||||
"minimatch": "^3.1.2",
|
||||
"strip-json-comments": "^3.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-github/node_modules/@eslint/eslintrc/node_modules/globals": {
|
||||
"version": "14.0.0",
|
||||
"resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz",
|
||||
"integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-github/node_modules/@eslint/js": {
|
||||
"version": "9.17.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.17.0.tgz",
|
||||
"integrity": "sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-github/node_modules/ajv": {
|
||||
"version": "6.12.6",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
|
||||
"integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"fast-deep-equal": "^3.1.1",
|
||||
"fast-json-stable-stringify": "^2.0.0",
|
||||
"json-schema-traverse": "^0.4.1",
|
||||
"uri-js": "^4.2.2"
|
||||
},
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/epoberezkin"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-github/node_modules/brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-github/node_modules/globals": {
|
||||
"version": "15.14.0",
|
||||
"resolved": "https://registry.npmjs.org/globals/-/globals-15.14.0.tgz",
|
||||
"integrity": "sha512-OkToC372DtlQeje9/zHIo5CT8lRP/FUgEOKBEhU4e0abL7J7CD24fD9ohiLN5hagG/kWCYj4K5oaxxtj2Z0Dig==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-github/node_modules/json-schema-traverse": {
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
|
||||
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/eslint-plugin-github/node_modules/minimatch": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
"eslint": "^8.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-i18n-text": {
|
||||
@ -14063,29 +13932,6 @@
|
||||
"node": ">=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/typescript-eslint": {
|
||||
"version": "8.18.1",
|
||||
"resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.18.1.tgz",
|
||||
"integrity": "sha512-Mlaw6yxuaDEPQvb/2Qwu3/TfgeBHy9iTJ3mTwe7OvpPmF6KPQjVOfGyEJpPv6Ez2C34OODChhXrzYw/9phI0MQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "8.18.1",
|
||||
"@typescript-eslint/parser": "8.18.1",
|
||||
"@typescript-eslint/utils": "8.18.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^8.57.0 || ^9.0.0",
|
||||
"typescript": ">=4.8.4 <5.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/typo-js": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/typo-js/-/typo-js-1.2.5.tgz",
|
||||
|
@ -86,7 +86,7 @@
|
||||
"eslint": "8.57.0",
|
||||
"eslint-import-resolver-typescript": "3.7.0",
|
||||
"eslint-plugin-array-func": "4.0.0",
|
||||
"eslint-plugin-github": "5.1.4",
|
||||
"eslint-plugin-github": "5.0.2",
|
||||
"eslint-plugin-import-x": "4.6.1",
|
||||
"eslint-plugin-no-jquery": "3.1.0",
|
||||
"eslint-plugin-no-use-extend-native": "0.5.0",
|
||||
|
@ -37,8 +37,6 @@ import (
|
||||
"code.gitea.io/gitea/routers/api/packages/vagrant"
|
||||
"code.gitea.io/gitea/services/auth"
|
||||
"code.gitea.io/gitea/services/context"
|
||||
|
||||
"github.com/go-chi/chi/v5"
|
||||
)
|
||||
|
||||
func reqPackageAccess(accessMode perm.AccessMode) func(ctx *context.Context) {
|
||||
@ -140,39 +138,10 @@ func CommonRoutes() *web.Router {
|
||||
}, reqPackageAccess(perm.AccessModeRead))
|
||||
r.Group("/arch", func() {
|
||||
r.Methods("HEAD,GET", "/repository.key", arch.GetRepositoryKey)
|
||||
|
||||
reqPutRepository := web.NewPathProcessor("PUT", "/<repository:*>")
|
||||
reqGetRepoArchFile := web.NewPathProcessor("HEAD,GET", "/<repository:*>/<architecture>/<filename>")
|
||||
reqDeleteRepoNameVerArch := web.NewPathProcessor("DELETE", "/<repository:*>/<name>/<version>/<architecture>")
|
||||
|
||||
r.Any("*", func(ctx *context.Context) {
|
||||
chiCtx := chi.RouteContext(ctx.Req.Context())
|
||||
path := ctx.PathParam("*")
|
||||
|
||||
if reqPutRepository.ProcessRequestPath(chiCtx, path) {
|
||||
reqPackageAccess(perm.AccessModeWrite)(ctx)
|
||||
if ctx.Written() {
|
||||
return
|
||||
}
|
||||
arch.UploadPackageFile(ctx)
|
||||
return
|
||||
}
|
||||
|
||||
if reqGetRepoArchFile.ProcessRequestPath(chiCtx, path) {
|
||||
arch.GetPackageOrRepositoryFile(ctx)
|
||||
return
|
||||
}
|
||||
|
||||
if reqDeleteRepoNameVerArch.ProcessRequestPath(chiCtx, path) {
|
||||
reqPackageAccess(perm.AccessModeWrite)(ctx)
|
||||
if ctx.Written() {
|
||||
return
|
||||
}
|
||||
arch.DeletePackageVersion(ctx)
|
||||
return
|
||||
}
|
||||
|
||||
ctx.Status(http.StatusNotFound)
|
||||
r.PathGroup("*", func(g *web.RouterPathGroup) {
|
||||
g.MatchPath("PUT", "/<repository:*>", reqPackageAccess(perm.AccessModeWrite), arch.UploadPackageFile)
|
||||
g.MatchPath("HEAD,GET", "/<repository:*>/<architecture>/<filename>", arch.GetPackageOrRepositoryFile)
|
||||
g.MatchPath("DELETE", "/<repository:*>/<name>/<version>/<architecture>", reqPackageAccess(perm.AccessModeWrite), arch.DeletePackageVersion)
|
||||
})
|
||||
}, reqPackageAccess(perm.AccessModeRead))
|
||||
r.Group("/cargo", func() {
|
||||
|
@ -11,7 +11,6 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"path"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@ -242,19 +241,14 @@ func getBlobForEntry(ctx *context.APIContext) (blob *git.Blob, entry *git.TreeEn
|
||||
return nil, nil, nil
|
||||
}
|
||||
|
||||
info, _, err := git.Entries([]*git.TreeEntry{entry}).GetCommitsInfo(ctx, ctx.Repo.Commit, path.Dir("/" + ctx.Repo.TreePath)[1:])
|
||||
latestCommit, err := ctx.Repo.GitRepo.GetTreePathLatestCommit(ctx.Repo.Commit.ID.String(), ctx.Repo.TreePath)
|
||||
if err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, "GetCommitsInfo", err)
|
||||
ctx.Error(http.StatusInternalServerError, "GetTreePathLatestCommit", err)
|
||||
return nil, nil, nil
|
||||
}
|
||||
when := &latestCommit.Committer.When
|
||||
|
||||
if len(info) == 1 {
|
||||
// Not Modified
|
||||
lastModified = &info[0].Commit.Committer.When
|
||||
}
|
||||
blob = entry.Blob()
|
||||
|
||||
return blob, entry, lastModified
|
||||
return entry.Blob(), entry, when
|
||||
}
|
||||
|
||||
// GetArchive get archive of a repository
|
||||
|
@ -335,6 +335,9 @@ func prepareForReplaceOrAdd(ctx *context.APIContext, form api.IssueLabelsOption)
|
||||
labelIDs = append(labelIDs, int64(rv.Float()))
|
||||
case reflect.String:
|
||||
labelNames = append(labelNames, rv.String())
|
||||
default:
|
||||
ctx.Error(http.StatusBadRequest, "InvalidLabel", "a label must be an integer or a string")
|
||||
return nil, nil, fmt.Errorf("invalid label")
|
||||
}
|
||||
}
|
||||
if len(labelIDs) > 0 && len(labelNames) > 0 {
|
||||
@ -342,11 +345,20 @@ func prepareForReplaceOrAdd(ctx *context.APIContext, form api.IssueLabelsOption)
|
||||
return nil, nil, fmt.Errorf("invalid labels")
|
||||
}
|
||||
if len(labelNames) > 0 {
|
||||
labelIDs, err = issues_model.GetLabelIDsInRepoByNames(ctx, ctx.Repo.Repository.ID, labelNames)
|
||||
repoLabelIDs, err := issues_model.GetLabelIDsInRepoByNames(ctx, ctx.Repo.Repository.ID, labelNames)
|
||||
if err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, "GetLabelIDsInRepoByNames", err)
|
||||
return nil, nil, err
|
||||
}
|
||||
labelIDs = append(labelIDs, repoLabelIDs...)
|
||||
if ctx.Repo.Owner.IsOrganization() {
|
||||
orgLabelIDs, err := issues_model.GetLabelIDsInOrgByNames(ctx, ctx.Repo.Owner.ID, labelNames)
|
||||
if err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, "GetLabelIDsInOrgByNames", err)
|
||||
return nil, nil, err
|
||||
}
|
||||
labelIDs = append(labelIDs, orgLabelIDs...)
|
||||
}
|
||||
}
|
||||
|
||||
labels, err := issues_model.GetLabelsByIDs(ctx, labelIDs, "id", "repo_id", "org_id", "name", "exclusive")
|
||||
|
@ -246,7 +246,7 @@ func CreateRelease(ctx *context.APIContext) {
|
||||
IsTag: false,
|
||||
Repo: ctx.Repo.Repository,
|
||||
}
|
||||
if err := release_service.CreateRelease(ctx.Repo.GitRepo, rel, nil, ""); err != nil {
|
||||
if err := release_service.CreateRelease(ctx.Repo.GitRepo, rel, nil, form.Note); err != nil {
|
||||
if repo_model.IsErrReleaseAlreadyExist(err) {
|
||||
ctx.Error(http.StatusConflict, "ReleaseAlreadyExist", err)
|
||||
} else if release_service.IsErrProtectedTagName(err) {
|
||||
|
@ -368,7 +368,7 @@ func handlePullRequestMerging(ctx *gitea_context.PrivateContext, opts *private.H
|
||||
if err := pull_model.DeleteScheduledAutoMerge(ctx, pr.ID); err != nil && !db.IsErrNotExist(err) {
|
||||
return fmt.Errorf("DeleteScheduledAutoMerge[%d]: %v", opts.PullRequestID, err)
|
||||
}
|
||||
if _, err := pr.SetMerged(ctx); err != nil {
|
||||
if _, err := pull_service.SetMerged(ctx, pr); err != nil {
|
||||
return fmt.Errorf("SetMerged failed: %s/%s Error: %v", ownerName, repoName, err)
|
||||
}
|
||||
return nil
|
||||
|
@ -94,7 +94,7 @@ func Emails(ctx *context.Context) {
|
||||
ctx.Data["Emails"] = emails
|
||||
|
||||
pager := context.NewPagination(int(count), opts.PageSize, opts.Page, 5)
|
||||
pager.SetDefaultParams(ctx)
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
ctx.HTML(http.StatusOK, tplEmails)
|
||||
|
@ -77,9 +77,7 @@ func Packages(ctx *context.Context) {
|
||||
ctx.Data["TotalUnreferencedBlobSize"] = totalUnreferencedBlobSize
|
||||
|
||||
pager := context.NewPagination(int(total), setting.UI.PackagesPagingNum, page, 5)
|
||||
pager.AddParamString("q", query)
|
||||
pager.AddParamString("type", packageType)
|
||||
pager.AddParamString("sort", sort)
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
ctx.HTML(http.StatusOK, tplPackagesList)
|
||||
|
@ -4,7 +4,6 @@
|
||||
package admin
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
@ -84,8 +83,7 @@ func UnadoptedRepos(ctx *context.Context) {
|
||||
|
||||
if !doSearch {
|
||||
pager := context.NewPagination(0, opts.PageSize, opts.Page, 5)
|
||||
pager.SetDefaultParams(ctx)
|
||||
pager.AddParamString("search", fmt.Sprint(doSearch))
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
ctx.HTML(http.StatusOK, tplUnadoptedRepos)
|
||||
return
|
||||
@ -99,8 +97,7 @@ func UnadoptedRepos(ctx *context.Context) {
|
||||
}
|
||||
ctx.Data["Dirs"] = repoNames
|
||||
pager := context.NewPagination(count, opts.PageSize, opts.Page, 5)
|
||||
pager.SetDefaultParams(ctx)
|
||||
pager.AddParamString("search", fmt.Sprint(doSearch))
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
ctx.HTML(http.StatusOK, tplUnadoptedRepos)
|
||||
}
|
||||
|
@ -47,16 +47,12 @@ func Users(ctx *context.Context) {
|
||||
ctx.Data["Title"] = ctx.Tr("admin.users")
|
||||
ctx.Data["PageIsAdminUsers"] = true
|
||||
|
||||
extraParamStrings := map[string]string{}
|
||||
statusFilterKeys := []string{"is_active", "is_admin", "is_restricted", "is_2fa_enabled", "is_prohibit_login"}
|
||||
statusFilterMap := map[string]string{}
|
||||
for _, filterKey := range statusFilterKeys {
|
||||
paramKey := "status_filter[" + filterKey + "]"
|
||||
paramVal := ctx.FormString(paramKey)
|
||||
statusFilterMap[filterKey] = paramVal
|
||||
if paramVal != "" {
|
||||
extraParamStrings[paramKey] = paramVal
|
||||
}
|
||||
}
|
||||
|
||||
sortType := ctx.FormString("sort")
|
||||
@ -82,7 +78,6 @@ func Users(ctx *context.Context) {
|
||||
IsTwoFactorEnabled: util.OptionalBoolParse(statusFilterMap["is_2fa_enabled"]),
|
||||
IsProhibitLogin: util.OptionalBoolParse(statusFilterMap["is_prohibit_login"]),
|
||||
IncludeReserved: true, // administrator needs to list all accounts include reserved, bot, remote ones
|
||||
ExtraParamStrings: extraParamStrings,
|
||||
}, tplUsers)
|
||||
}
|
||||
|
||||
|
@ -689,7 +689,7 @@ func Activate(ctx *context.Context) {
|
||||
}
|
||||
|
||||
// TODO: ctx.Doer/ctx.Data["SignedUser"] could be nil or not the same user as the one being activated
|
||||
user := user_model.VerifyUserActiveCode(ctx, code)
|
||||
user := user_model.VerifyUserTimeLimitCode(ctx, &user_model.TimeLimitCodeOptions{Purpose: user_model.TimeLimitCodeActivateAccount}, code)
|
||||
if user == nil { // if code is wrong
|
||||
renderActivationPromptMessage(ctx, ctx.Locale.Tr("auth.invalid_code"))
|
||||
return
|
||||
@ -734,7 +734,7 @@ func ActivatePost(ctx *context.Context) {
|
||||
}
|
||||
|
||||
// TODO: ctx.Doer/ctx.Data["SignedUser"] could be nil or not the same user as the one being activated
|
||||
user := user_model.VerifyUserActiveCode(ctx, code)
|
||||
user := user_model.VerifyUserTimeLimitCode(ctx, &user_model.TimeLimitCodeOptions{Purpose: user_model.TimeLimitCodeActivateAccount}, code)
|
||||
if user == nil { // if code is wrong
|
||||
renderActivationPromptMessage(ctx, ctx.Locale.Tr("auth.invalid_code"))
|
||||
return
|
||||
|
@ -113,7 +113,7 @@ func commonResetPassword(ctx *context.Context) (*user_model.User, *auth.TwoFacto
|
||||
}
|
||||
|
||||
// Fail early, don't frustrate the user
|
||||
u := user_model.VerifyUserActiveCode(ctx, code)
|
||||
u := user_model.VerifyUserTimeLimitCode(ctx, &user_model.TimeLimitCodeOptions{Purpose: user_model.TimeLimitCodeResetPassword}, code)
|
||||
if u == nil {
|
||||
ctx.Flash.Error(ctx.Tr("auth.invalid_code_forgot_password", fmt.Sprintf("%s/user/forgot_password", setting.AppSubURL)), true)
|
||||
return nil, nil
|
||||
|
@ -9,6 +9,10 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"code.gitea.io/gitea/models/asymkey"
|
||||
"code.gitea.io/gitea/models/db"
|
||||
user_model "code.gitea.io/gitea/models/user"
|
||||
"code.gitea.io/gitea/modules/git"
|
||||
"code.gitea.io/gitea/modules/templates"
|
||||
"code.gitea.io/gitea/services/context"
|
||||
)
|
||||
@ -41,16 +45,85 @@ func FetchActionTest(ctx *context.Context) {
|
||||
ctx.JSONRedirect("")
|
||||
}
|
||||
|
||||
func Tmpl(ctx *context.Context) {
|
||||
now := time.Now()
|
||||
ctx.Data["TimeNow"] = now
|
||||
ctx.Data["TimePast5s"] = now.Add(-5 * time.Second)
|
||||
ctx.Data["TimeFuture5s"] = now.Add(5 * time.Second)
|
||||
ctx.Data["TimePast2m"] = now.Add(-2 * time.Minute)
|
||||
ctx.Data["TimeFuture2m"] = now.Add(2 * time.Minute)
|
||||
ctx.Data["TimePast1y"] = now.Add(-1 * 366 * 86400 * time.Second)
|
||||
ctx.Data["TimeFuture1y"] = now.Add(1 * 366 * 86400 * time.Second)
|
||||
func prepareMockData(ctx *context.Context) {
|
||||
if ctx.Req.URL.Path == "/devtest/gitea-ui" {
|
||||
now := time.Now()
|
||||
ctx.Data["TimeNow"] = now
|
||||
ctx.Data["TimePast5s"] = now.Add(-5 * time.Second)
|
||||
ctx.Data["TimeFuture5s"] = now.Add(5 * time.Second)
|
||||
ctx.Data["TimePast2m"] = now.Add(-2 * time.Minute)
|
||||
ctx.Data["TimeFuture2m"] = now.Add(2 * time.Minute)
|
||||
ctx.Data["TimePast1y"] = now.Add(-1 * 366 * 86400 * time.Second)
|
||||
ctx.Data["TimeFuture1y"] = now.Add(1 * 366 * 86400 * time.Second)
|
||||
}
|
||||
|
||||
if ctx.Req.URL.Path == "/devtest/commit-sign-badge" {
|
||||
var commits []*asymkey.SignCommit
|
||||
mockUsers, _ := db.Find[user_model.User](ctx, user_model.SearchUserOptions{ListOptions: db.ListOptions{PageSize: 1}})
|
||||
mockUser := mockUsers[0]
|
||||
commits = append(commits, &asymkey.SignCommit{
|
||||
Verification: &asymkey.CommitVerification{},
|
||||
UserCommit: &user_model.UserCommit{
|
||||
Commit: &git.Commit{ID: git.Sha1ObjectFormat.EmptyObjectID()},
|
||||
},
|
||||
})
|
||||
commits = append(commits, &asymkey.SignCommit{
|
||||
Verification: &asymkey.CommitVerification{
|
||||
Verified: true,
|
||||
Reason: "name / key-id",
|
||||
SigningUser: mockUser,
|
||||
SigningKey: &asymkey.GPGKey{KeyID: "12345678"},
|
||||
TrustStatus: "trusted",
|
||||
},
|
||||
UserCommit: &user_model.UserCommit{
|
||||
User: mockUser,
|
||||
Commit: &git.Commit{ID: git.Sha1ObjectFormat.EmptyObjectID()},
|
||||
},
|
||||
})
|
||||
commits = append(commits, &asymkey.SignCommit{
|
||||
Verification: &asymkey.CommitVerification{
|
||||
Verified: true,
|
||||
Reason: "name / key-id",
|
||||
SigningUser: mockUser,
|
||||
SigningSSHKey: &asymkey.PublicKey{Fingerprint: "aa:bb:cc:dd:ee"},
|
||||
TrustStatus: "untrusted",
|
||||
},
|
||||
UserCommit: &user_model.UserCommit{
|
||||
User: mockUser,
|
||||
Commit: &git.Commit{ID: git.Sha1ObjectFormat.EmptyObjectID()},
|
||||
},
|
||||
})
|
||||
commits = append(commits, &asymkey.SignCommit{
|
||||
Verification: &asymkey.CommitVerification{
|
||||
Verified: true,
|
||||
Reason: "name / key-id",
|
||||
SigningUser: mockUser,
|
||||
SigningSSHKey: &asymkey.PublicKey{Fingerprint: "aa:bb:cc:dd:ee"},
|
||||
TrustStatus: "other(unmatch)",
|
||||
},
|
||||
UserCommit: &user_model.UserCommit{
|
||||
User: mockUser,
|
||||
Commit: &git.Commit{ID: git.Sha1ObjectFormat.EmptyObjectID()},
|
||||
},
|
||||
})
|
||||
commits = append(commits, &asymkey.SignCommit{
|
||||
Verification: &asymkey.CommitVerification{
|
||||
Warning: true,
|
||||
Reason: "gpg.error",
|
||||
SigningEmail: "test@example.com",
|
||||
},
|
||||
UserCommit: &user_model.UserCommit{
|
||||
User: mockUser,
|
||||
Commit: &git.Commit{ID: git.Sha1ObjectFormat.EmptyObjectID()},
|
||||
},
|
||||
})
|
||||
|
||||
ctx.Data["MockCommits"] = commits
|
||||
}
|
||||
}
|
||||
|
||||
func Tmpl(ctx *context.Context) {
|
||||
prepareMockData(ctx)
|
||||
if ctx.Req.Method == "POST" {
|
||||
_ = ctx.Req.ParseForm()
|
||||
ctx.Flash.Info("form: "+ctx.Req.Method+" "+ctx.Req.RequestURI+"<br>"+
|
||||
@ -60,6 +133,5 @@ func Tmpl(ctx *context.Context) {
|
||||
)
|
||||
time.Sleep(2 * time.Second)
|
||||
}
|
||||
|
||||
ctx.HTML(http.StatusOK, templates.TplName("devtest"+path.Clean("/"+ctx.PathParam("sub"))))
|
||||
}
|
||||
|
@ -137,8 +137,7 @@ func Code(ctx *context.Context) {
|
||||
ctx.Data["SearchResultLanguages"] = searchResultLanguages
|
||||
|
||||
pager := context.NewPagination(total, setting.UI.RepoSearchPagingNum, page, 5)
|
||||
pager.SetDefaultParams(ctx)
|
||||
pager.AddParamString("l", language)
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
ctx.HTML(http.StatusOK, tplExploreCode)
|
||||
|
@ -4,7 +4,6 @@
|
||||
package explore
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"code.gitea.io/gitea/models/db"
|
||||
@ -139,25 +138,7 @@ func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) {
|
||||
ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled
|
||||
|
||||
pager := context.NewPagination(int(count), opts.PageSize, page, 5)
|
||||
pager.SetDefaultParams(ctx)
|
||||
pager.AddParamString("topic", fmt.Sprint(topicOnly))
|
||||
pager.AddParamString("language", language)
|
||||
pager.AddParamString(relevantReposOnlyParam, fmt.Sprint(opts.OnlyShowRelevant))
|
||||
if archived.Has() {
|
||||
pager.AddParamString("archived", fmt.Sprint(archived.Value()))
|
||||
}
|
||||
if fork.Has() {
|
||||
pager.AddParamString("fork", fmt.Sprint(fork.Value()))
|
||||
}
|
||||
if mirror.Has() {
|
||||
pager.AddParamString("mirror", fmt.Sprint(mirror.Value()))
|
||||
}
|
||||
if template.Has() {
|
||||
pager.AddParamString("template", fmt.Sprint(template.Value()))
|
||||
}
|
||||
if private.Has() {
|
||||
pager.AddParamString("private", fmt.Sprint(private.Value()))
|
||||
}
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
ctx.HTML(http.StatusOK, opts.TplName)
|
||||
|
@ -120,10 +120,7 @@ func RenderUserSearch(ctx *context.Context, opts *user_model.SearchUserOptions,
|
||||
ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled
|
||||
|
||||
pager := context.NewPagination(int(count), opts.PageSize, opts.Page, 5)
|
||||
pager.SetDefaultParams(ctx)
|
||||
for paramKey, paramVal := range opts.ExtraParamStrings {
|
||||
pager.AddParamString(paramKey, paramVal)
|
||||
}
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
ctx.HTML(http.StatusOK, tplName)
|
||||
|
@ -4,7 +4,6 @@
|
||||
package org
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"path"
|
||||
"strings"
|
||||
@ -146,23 +145,7 @@ func home(ctx *context.Context, viewRepositories bool) {
|
||||
ctx.Data["Total"] = count
|
||||
|
||||
pager := context.NewPagination(int(count), setting.UI.User.RepoPagingNum, page, 5)
|
||||
pager.SetDefaultParams(ctx)
|
||||
pager.AddParamString("language", language)
|
||||
if archived.Has() {
|
||||
pager.AddParamString("archived", fmt.Sprint(archived.Value()))
|
||||
}
|
||||
if fork.Has() {
|
||||
pager.AddParamString("fork", fmt.Sprint(fork.Value()))
|
||||
}
|
||||
if mirror.Has() {
|
||||
pager.AddParamString("mirror", fmt.Sprint(mirror.Value()))
|
||||
}
|
||||
if template.Has() {
|
||||
pager.AddParamString("template", fmt.Sprint(template.Value()))
|
||||
}
|
||||
if private.Has() {
|
||||
pager.AddParamString("private", fmt.Sprint(private.Value()))
|
||||
}
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
ctx.HTML(http.StatusOK, tplOrgHome)
|
||||
|
@ -120,7 +120,7 @@ func Projects(ctx *context.Context) {
|
||||
}
|
||||
|
||||
pager := context.NewPagination(int(total), setting.UI.IssuePagingNum, page, numPages)
|
||||
pager.AddParamString("state", fmt.Sprint(ctx.Data["State"]))
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
ctx.Data["CanWriteProjects"] = canWriteProjects(ctx)
|
||||
|
@ -6,7 +6,6 @@ package actions
|
||||
import (
|
||||
"bytes"
|
||||
stdCtx "context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"slices"
|
||||
"strings"
|
||||
@ -262,10 +261,7 @@ func List(ctx *context.Context) {
|
||||
ctx.Data["StatusInfoList"] = actions_model.GetStatusInfoList(ctx)
|
||||
|
||||
pager := context.NewPagination(int(total), opts.PageSize, opts.Page, 5)
|
||||
pager.SetDefaultParams(ctx)
|
||||
pager.AddParamString("workflow", workflowID)
|
||||
pager.AddParamString("actor", fmt.Sprint(actorID))
|
||||
pager.AddParamString("status", fmt.Sprint(status))
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
ctx.Data["HasWorkflowsOrRuns"] = len(workflows) > 0 || len(runs) > 0
|
||||
|
||||
|
@ -87,7 +87,7 @@ func Branches(ctx *context.Context) {
|
||||
ctx.Data["CommitStatuses"] = commitStatuses
|
||||
ctx.Data["DefaultBranchBranch"] = defaultBranch
|
||||
pager := context.NewPagination(int(branchesCount), pageSize, page, 5)
|
||||
pager.SetDefaultParams(ctx)
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
ctx.HTML(http.StatusOK, tplBranch)
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ func Commits(ctx *context.Context) {
|
||||
ctx.Data["CommitCount"] = commitsCount
|
||||
|
||||
pager := context.NewPagination(int(commitsCount), pageSize, page, 5)
|
||||
pager.SetDefaultParams(ctx)
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
ctx.HTML(http.StatusOK, tplCommits)
|
||||
}
|
||||
@ -139,7 +139,6 @@ func Graph(ctx *context.Context) {
|
||||
if err != nil {
|
||||
log.Warn("GetCommitGraphsCount error for generate graph exclude prs: %t branches: %s in %-v, Will Ignore branches and try again. Underlying Error: %v", hidePRRefs, branches, ctx.Repo.Repository, err)
|
||||
realBranches = []string{}
|
||||
branches = []string{}
|
||||
graphCommitsCount, err = ctx.Repo.GetCommitGraphsCount(ctx, hidePRRefs, realBranches, files)
|
||||
if err != nil {
|
||||
ctx.ServerError("GetCommitGraphsCount", err)
|
||||
@ -175,14 +174,7 @@ func Graph(ctx *context.Context) {
|
||||
ctx.Data["CommitCount"] = commitsCount
|
||||
|
||||
paginator := context.NewPagination(int(graphCommitsCount), setting.UI.GraphMaxCommitNum, page, 5)
|
||||
paginator.AddParamString("mode", mode)
|
||||
paginator.AddParamString("hide-pr-refs", fmt.Sprint(hidePRRefs))
|
||||
for _, branch := range branches {
|
||||
paginator.AddParamString("branch", branch)
|
||||
}
|
||||
for _, file := range files {
|
||||
paginator.AddParamString("file", file)
|
||||
}
|
||||
paginator.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = paginator
|
||||
if ctx.FormBool("div-only") {
|
||||
ctx.HTML(http.StatusOK, tplGraphDiv)
|
||||
@ -262,7 +254,7 @@ func FileHistory(ctx *context.Context) {
|
||||
ctx.Data["CommitCount"] = commitsCount
|
||||
|
||||
pager := context.NewPagination(int(commitsCount), setting.Git.CommitsRangeSize, page, 5)
|
||||
pager.SetDefaultParams(ctx)
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
ctx.HTML(http.StatusOK, tplCommits)
|
||||
}
|
||||
|
@ -5,7 +5,6 @@
|
||||
package repo
|
||||
|
||||
import (
|
||||
"path"
|
||||
"time"
|
||||
|
||||
git_model "code.gitea.io/gitea/models/git"
|
||||
@ -82,7 +81,7 @@ func ServeBlobOrLFS(ctx *context.Context, blob *git.Blob, lastModified *time.Tim
|
||||
return common.ServeBlob(ctx.Base, ctx.Repo.TreePath, blob, lastModified)
|
||||
}
|
||||
|
||||
func getBlobForEntry(ctx *context.Context) (blob *git.Blob, lastModified *time.Time) {
|
||||
func getBlobForEntry(ctx *context.Context) (*git.Blob, *time.Time) {
|
||||
entry, err := ctx.Repo.Commit.GetTreeEntryByPath(ctx.Repo.TreePath)
|
||||
if err != nil {
|
||||
if git.IsErrNotExist(err) {
|
||||
@ -98,19 +97,14 @@ func getBlobForEntry(ctx *context.Context) (blob *git.Blob, lastModified *time.T
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
info, _, err := git.Entries([]*git.TreeEntry{entry}).GetCommitsInfo(ctx, ctx.Repo.Commit, path.Dir("/" + ctx.Repo.TreePath)[1:])
|
||||
latestCommit, err := ctx.Repo.GitRepo.GetTreePathLatestCommit(ctx.Repo.Commit.ID.String(), ctx.Repo.TreePath)
|
||||
if err != nil {
|
||||
ctx.ServerError("GetCommitsInfo", err)
|
||||
ctx.ServerError("GetTreePathLatestCommit", err)
|
||||
return nil, nil
|
||||
}
|
||||
lastModified := &latestCommit.Committer.When
|
||||
|
||||
if len(info) == 1 {
|
||||
// Not Modified
|
||||
lastModified = &info[0].Commit.Committer.When
|
||||
}
|
||||
blob = entry.Blob()
|
||||
|
||||
return blob, lastModified
|
||||
return entry.Blob(), lastModified
|
||||
}
|
||||
|
||||
// SingleDownload download a file by repos path
|
||||
|
@ -162,10 +162,11 @@ func TestUpdateIssueLabel_Toggle(t *testing.T) {
|
||||
UpdateIssueLabel(ctx)
|
||||
assert.EqualValues(t, http.StatusOK, ctx.Resp.Status())
|
||||
for _, issueID := range testCase.IssueIDs {
|
||||
unittest.AssertExistsIf(t, testCase.ExpectedAdd, &issues_model.IssueLabel{
|
||||
IssueID: issueID,
|
||||
LabelID: testCase.LabelID,
|
||||
})
|
||||
if testCase.ExpectedAdd {
|
||||
unittest.AssertExistsAndLoadBean(t, &issues_model.IssueLabel{IssueID: issueID, LabelID: testCase.LabelID})
|
||||
} else {
|
||||
unittest.AssertNotExistsBean(t, &issues_model.IssueLabel{IssueID: issueID, LabelID: testCase.LabelID})
|
||||
}
|
||||
}
|
||||
unittest.CheckConsistencyFor(t, &issues_model.Label{})
|
||||
}
|
||||
|
@ -4,7 +4,6 @@
|
||||
package repo
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/url"
|
||||
|
||||
@ -93,8 +92,7 @@ func Milestones(ctx *context.Context) {
|
||||
ctx.Data["IsShowClosed"] = isShowClosed
|
||||
|
||||
pager := context.NewPagination(int(total), setting.UI.IssuePagingNum, page, 5)
|
||||
pager.AddParamString("state", fmt.Sprint(ctx.Data["State"]))
|
||||
pager.AddParamString("q", keyword)
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
ctx.HTML(http.StatusOK, tplMilestone)
|
||||
|
@ -70,8 +70,7 @@ func Packages(ctx *context.Context) {
|
||||
ctx.Data["RepositoryAccessMap"] = map[int64]bool{ctx.Repo.Repository.ID: true} // There is only the current repository
|
||||
|
||||
pager := context.NewPagination(int(total), setting.UI.PackagesPagingNum, page, 5)
|
||||
pager.AddParamString("q", query)
|
||||
pager.AddParamString("type", packageType)
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
ctx.HTML(http.StatusOK, tplPackagesList)
|
||||
|
@ -115,7 +115,7 @@ func Projects(ctx *context.Context) {
|
||||
}
|
||||
|
||||
pager := context.NewPagination(total, setting.UI.IssuePagingNum, page, numPages)
|
||||
pager.AddParamString("state", fmt.Sprint(ctx.Data["State"]))
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
ctx.Data["CanWriteProjects"] = ctx.Repo.Permission.CanWrite(unit.TypeProjects)
|
||||
|
@ -186,7 +186,7 @@ func Releases(ctx *context.Context) {
|
||||
|
||||
numReleases := ctx.Data["NumReleases"].(int64)
|
||||
pager := context.NewPagination(int(numReleases), listOptions.PageSize, listOptions.Page, 5)
|
||||
pager.SetDefaultParams(ctx)
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
ctx.HTML(http.StatusOK, tplReleasesList)
|
||||
}
|
||||
@ -240,7 +240,7 @@ func TagsList(ctx *context.Context) {
|
||||
ctx.Data["TagCount"] = count
|
||||
|
||||
pager := context.NewPagination(int(count), opts.PageSize, opts.Page, 5)
|
||||
pager.SetDefaultParams(ctx)
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
ctx.Data["PageIsViewCode"] = !ctx.Repo.Repository.UnitEnabled(ctx, unit.TypeReleases)
|
||||
ctx.HTML(http.StatusOK, tplTagsList)
|
||||
|
@ -108,8 +108,7 @@ func Search(ctx *context.Context) {
|
||||
ctx.Data["SearchResultLanguages"] = searchResultLanguages
|
||||
|
||||
pager := context.NewPagination(total, setting.UI.RepoSearchPagingNum, page, 5)
|
||||
pager.SetDefaultParams(ctx)
|
||||
pager.AddParamString("l", language)
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
ctx.HTML(http.StatusOK, tplSearch)
|
||||
|
@ -440,8 +440,7 @@ func renderRevisionPage(ctx *context.Context) (*git.Repository, *git.TreeEntry)
|
||||
ctx.Data["Commits"] = git_model.ConvertFromGitCommit(ctx, commitsHistory, ctx.Repo.Repository)
|
||||
|
||||
pager := context.NewPagination(int(commitsCount), setting.Git.CommitsRangeSize, page, 5)
|
||||
pager.SetDefaultParams(ctx)
|
||||
pager.AddParamString("action", "_revision")
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
return wikiRepo, entry
|
||||
|
@ -61,11 +61,20 @@ func PrepareContextForProfileBigAvatar(ctx *context.Context) {
|
||||
orgs, err := db.Find[organization.Organization](ctx, organization.FindOrgOptions{
|
||||
UserID: ctx.ContextUser.ID,
|
||||
IncludePrivate: showPrivate,
|
||||
ListOptions: db.ListOptions{
|
||||
Page: 1,
|
||||
// query one more results (without a separate counting) to see whether we need to add the "show more orgs" link
|
||||
PageSize: setting.UI.User.OrgPagingNum + 1,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
ctx.ServerError("FindOrgs", err)
|
||||
return
|
||||
}
|
||||
if len(orgs) > setting.UI.User.OrgPagingNum {
|
||||
orgs = orgs[:setting.UI.User.OrgPagingNum]
|
||||
ctx.Data["ShowMoreOrgs"] = true
|
||||
}
|
||||
ctx.Data["Orgs"] = orgs
|
||||
ctx.Data["HasOrgsVisible"] = organization.HasOrgsVisible(ctx, orgs, ctx.Doer)
|
||||
|
||||
|
@ -121,8 +121,7 @@ func CodeSearch(ctx *context.Context) {
|
||||
ctx.Data["SearchResultLanguages"] = searchResultLanguages
|
||||
|
||||
pager := context.NewPagination(total, setting.UI.RepoSearchPagingNum, page, 5)
|
||||
pager.SetDefaultParams(ctx)
|
||||
pager.AddParamString("l", language)
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
ctx.HTML(http.StatusOK, tplUserCode)
|
||||
|
@ -139,7 +139,7 @@ func Dashboard(ctx *context.Context) {
|
||||
ctx.Data["Feeds"] = feeds
|
||||
|
||||
pager := context.NewPagination(int(count), setting.UI.FeedPagingNum, page, 5)
|
||||
pager.AddParamString("date", date)
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
ctx.HTML(http.StatusOK, tplDashboard)
|
||||
@ -330,10 +330,7 @@ func Milestones(ctx *context.Context) {
|
||||
ctx.Data["IsShowClosed"] = isShowClosed
|
||||
|
||||
pager := context.NewPagination(pagerCount, setting.UI.IssuePagingNum, page, 5)
|
||||
pager.AddParamString("q", keyword)
|
||||
pager.AddParamString("repos", reposQuery)
|
||||
pager.AddParamString("sort", sortType)
|
||||
pager.AddParamString("state", fmt.Sprint(ctx.Data["State"]))
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
ctx.HTML(http.StatusOK, tplMilestones)
|
||||
|
@ -173,7 +173,7 @@ func getNotifications(ctx *context.Context) {
|
||||
ctx.Data["Status"] = status
|
||||
ctx.Data["Notifications"] = notifications
|
||||
|
||||
pager.SetDefaultParams(ctx)
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
}
|
||||
|
||||
@ -357,8 +357,7 @@ func NotificationSubscriptions(ctx *context.Context) {
|
||||
ctx.Redirect(fmt.Sprintf("/notifications/subscriptions?page=%d", pager.Paginater.Current()))
|
||||
return
|
||||
}
|
||||
pager.AddParamString("sort", sortType)
|
||||
pager.AddParamString("state", state)
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
ctx.HTML(http.StatusOK, tplNotificationSubscriptions)
|
||||
@ -446,22 +445,7 @@ func NotificationWatching(ctx *context.Context) {
|
||||
|
||||
// redirect to last page if request page is more than total pages
|
||||
pager := context.NewPagination(total, setting.UI.User.RepoPagingNum, page, 5)
|
||||
pager.SetDefaultParams(ctx)
|
||||
if archived.Has() {
|
||||
pager.AddParamString("archived", fmt.Sprint(archived.Value()))
|
||||
}
|
||||
if fork.Has() {
|
||||
pager.AddParamString("fork", fmt.Sprint(fork.Value()))
|
||||
}
|
||||
if mirror.Has() {
|
||||
pager.AddParamString("mirror", fmt.Sprint(mirror.Value()))
|
||||
}
|
||||
if template.Has() {
|
||||
pager.AddParamString("template", fmt.Sprint(template.Value()))
|
||||
}
|
||||
if private.Has() {
|
||||
pager.AddParamString("private", fmt.Sprint(private.Value()))
|
||||
}
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
ctx.Data["Status"] = 2
|
||||
|
@ -128,8 +128,7 @@ func ListPackages(ctx *context.Context) {
|
||||
}
|
||||
|
||||
pager := context.NewPagination(int(total), setting.UI.PackagesPagingNum, page, 5)
|
||||
pager.AddParamString("q", query)
|
||||
pager.AddParamString("type", packageType)
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
ctx.HTML(http.StatusOK, tplPackagesList)
|
||||
@ -348,11 +347,6 @@ func ListPackageVersions(ctx *context.Context) {
|
||||
ctx.Data["Query"] = query
|
||||
ctx.Data["Sort"] = sort
|
||||
|
||||
pagerParams := map[string]string{
|
||||
"q": query,
|
||||
"sort": sort,
|
||||
}
|
||||
|
||||
var (
|
||||
total int64
|
||||
pvs []*packages_model.PackageVersion
|
||||
@ -361,7 +355,6 @@ func ListPackageVersions(ctx *context.Context) {
|
||||
case packages_model.TypeContainer:
|
||||
tagged := ctx.FormTrim("tagged")
|
||||
|
||||
pagerParams["tagged"] = tagged
|
||||
ctx.Data["Tagged"] = tagged
|
||||
|
||||
pvs, total, err = container_model.SearchImageTags(ctx, &container_model.ImageTagsSearchOptions{
|
||||
@ -407,9 +400,7 @@ func ListPackageVersions(ctx *context.Context) {
|
||||
}
|
||||
|
||||
pager := context.NewPagination(int(total), setting.UI.PackagesPagingNum, page, 5)
|
||||
for k, v := range pagerParams {
|
||||
pager.AddParamString(k, v)
|
||||
}
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
ctx.HTML(http.StatusOK, tplPackageVersionList)
|
||||
|
@ -12,6 +12,7 @@ import (
|
||||
|
||||
activities_model "code.gitea.io/gitea/models/activities"
|
||||
"code.gitea.io/gitea/models/db"
|
||||
"code.gitea.io/gitea/models/organization"
|
||||
"code.gitea.io/gitea/models/renderhelper"
|
||||
repo_model "code.gitea.io/gitea/models/repo"
|
||||
user_model "code.gitea.io/gitea/models/user"
|
||||
@ -256,6 +257,21 @@ func prepareUserProfileTabData(ctx *context.Context, showPrivate bool, profileDb
|
||||
ctx.Data["ProfileReadme"] = profileContent
|
||||
}
|
||||
}
|
||||
case "organizations":
|
||||
orgs, count, err := db.FindAndCount[organization.Organization](ctx, organization.FindOrgOptions{
|
||||
UserID: ctx.ContextUser.ID,
|
||||
IncludePrivate: showPrivate,
|
||||
ListOptions: db.ListOptions{
|
||||
Page: page,
|
||||
PageSize: pagingNum,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
ctx.ServerError("GetUserOrganizations", err)
|
||||
return
|
||||
}
|
||||
ctx.Data["Cards"] = orgs
|
||||
total = int(count)
|
||||
default: // default to "repositories"
|
||||
repos, count, err = repo_model.SearchRepository(ctx, &repo_model.SearchRepoOptions{
|
||||
ListOptions: db.ListOptions{
|
||||
@ -294,31 +310,7 @@ func prepareUserProfileTabData(ctx *context.Context, showPrivate bool, profileDb
|
||||
}
|
||||
|
||||
pager := context.NewPagination(total, pagingNum, page, 5)
|
||||
pager.SetDefaultParams(ctx)
|
||||
pager.AddParamString("tab", tab)
|
||||
if tab != "followers" && tab != "following" && tab != "activity" && tab != "projects" {
|
||||
pager.AddParamString("language", language)
|
||||
}
|
||||
if tab == "activity" {
|
||||
if ctx.Data["Date"] != nil {
|
||||
pager.AddParamString("date", fmt.Sprint(ctx.Data["Date"]))
|
||||
}
|
||||
}
|
||||
if archived.Has() {
|
||||
pager.AddParamString("archived", fmt.Sprint(archived.Value()))
|
||||
}
|
||||
if fork.Has() {
|
||||
pager.AddParamString("fork", fmt.Sprint(fork.Value()))
|
||||
}
|
||||
if mirror.Has() {
|
||||
pager.AddParamString("mirror", fmt.Sprint(mirror.Value()))
|
||||
}
|
||||
if template.Has() {
|
||||
pager.AddParamString("template", fmt.Sprint(template.Value()))
|
||||
}
|
||||
if private.Has() {
|
||||
pager.AddParamString("private", fmt.Sprint(private.Value()))
|
||||
}
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
}
|
||||
|
||||
|
@ -222,7 +222,7 @@ func Organization(ctx *context.Context) {
|
||||
|
||||
ctx.Data["Orgs"] = orgs
|
||||
pager := context.NewPagination(int(total), opts.PageSize, opts.Page, 5)
|
||||
pager.SetDefaultParams(ctx)
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
ctx.HTML(http.StatusOK, tplSettingsOrganization)
|
||||
}
|
||||
@ -329,7 +329,7 @@ func Repos(ctx *context.Context) {
|
||||
}
|
||||
ctx.Data["ContextUser"] = ctxUser
|
||||
pager := context.NewPagination(count, opts.PageSize, opts.Page, 5)
|
||||
pager.SetDefaultParams(ctx)
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
ctx.Data["Page"] = pager
|
||||
ctx.HTML(http.StatusOK, tplSettingsRepositories)
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user