Compare commits

..

8 Commits

Author SHA1 Message Date
silverwind
0914a44a9b Clean up and improve non-gitea js error filter (#37148)
1. Filter out errors that contain `chrome-extension://` etc protocols
2. Extract filtering into its own function and test it
3. Fix the `window.config.assetUrlPrefix` mock, guaranteed to end with
`/assets`
4. Remove useless `??` and `?.` for properties that always exist

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
2026-04-09 08:36:08 +00:00
Copilot
6f9fa55785 models/fixtures: add "DO NOT add more test data" comment to all yml fixture files (#37150)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: wxiaoguang <2114189+wxiaoguang@users.noreply.github.com>
2026-04-09 13:26:21 +08:00
Lunny Xiao
8bf3c8b79d Frontport changelog of v1.26.0-rc0 (#37138) 2026-04-08 22:43:28 +02:00
Sebastian Ertz
dfd495f823 Update go dependencies (#37141)
|     | from | to  |
| --- | ---- | --- |
| github.com/aws/aws-sdk-go-v2/credentials | `v1.19.13` | `v1.19.14` |
| github.com/go-co-op/gocron/v2 | `v2.19.1` | `v2.20.0` |
| github.com/go-enry/go-enry/v2 | `v2.9.5` | `v2.9.6` |
| github.com/go-webauthn/webauthn | `v0.16.1` | `v0.16.3` |
| github.com/google/pprof | `v0.0.0-20260302011040-a15ffb7f9dcc` |
`v0.0.0-20260402051712-545e8a4df936` |
| github.com/lib/pq | `v1.12.1` | `v1.12.3` |
| github.com/mattn/go-isatty | `v0.0.20` | `v0.0.21` |
| github.com/mattn/go-sqlite3 | `v1.14.38` | `v1.14.42` |
| github.com/minio/minio-go/v7 | `v7.0.99` | `v7.0.100` |
| golang.org/x/sys | `v0.42.0` | `v0.43.0` |
| google.golang.org/grpc | `v1.79.3` | `v1.80.0` |
2026-04-08 19:07:17 +00:00
Sebastian Ertz
714f4207d9 Update javascript dependencies (#37142)
---

|     | from | to  |
| --- | ---- | --- |
| esbuild | `0.27.4` | `0.28.0` |
| katex | `0.16.44` | `0.16.45` |
| postcss | `8.5.8` | `8.5.9` |
| swagger-ui-dist | `5.32.1` | `5.32.2` |
| vite | `8.0.5` | `8.0.7` |
| vue | `3.5.31` | `3.5.32` |
2026-04-08 16:45:02 +00:00
silverwind
d600968aaf Bump min go version to 1.26.2 (#37139)
Update Go from 1.26.1 to 1.26.2 to fix 6 stdlib vulnerabilities:
- GO-2026-4947: `crypto/x509` chain building
- GO-2026-4946: `crypto/x509` policy validation
- GO-2026-4870: `crypto/tls` KeyUpdate DoS
- GO-2026-4869: `archive/tar` unbounded allocation
- GO-2026-4866: `crypto/x509` name constraints bypass
- GO-2026-4865: `html/template` XSS

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
2026-04-08 17:56:06 +02:00
Karthik Bhandary
fc178e3203 Add bulk repository deletion for organizations (#36763)
Fixes #36512

This PR adds a new API endpoint to delete all repositories within an
organization in a single operation, improving efficiency for
organization cleanup and management tasks.

---------

Signed-off-by: Karthik Bhandary <34509856+karthikbhandary2@users.noreply.github.com>
Co-authored-by: karthik.bhandary <karthik.bhandary@kfintech.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-04-08 04:32:22 +00:00
GiteaBot
03205d94da [skip ci] Updated translations via Crowdin 2026-04-08 00:55:16 +00:00
91 changed files with 1247 additions and 807 deletions

24
go.mod
View File

@@ -1,6 +1,6 @@
module code.gitea.io/gitea
go 1.26.1
go 1.26.2
// rfc5280 said: "The serial number is an integer assigned by the CA to each certificate."
// But some CAs use negative serial number, just relax the check. related:
@@ -27,7 +27,7 @@ require (
github.com/PuerkitoBio/goquery v1.12.0
github.com/SaveTheRbtz/zstd-seekable-format-go/pkg v0.8.0
github.com/alecthomas/chroma/v2 v2.23.1
github.com/aws/aws-sdk-go-v2/credentials v1.19.13
github.com/aws/aws-sdk-go-v2/credentials v1.19.14
github.com/aws/aws-sdk-go-v2/service/codecommit v1.33.12
github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb
github.com/blevesearch/bleve/v2 v2.5.7
@@ -49,21 +49,21 @@ require (
github.com/gliderlabs/ssh v0.3.8
github.com/go-chi/chi/v5 v5.2.5
github.com/go-chi/cors v1.2.2
github.com/go-co-op/gocron/v2 v2.19.1
github.com/go-enry/go-enry/v2 v2.9.5
github.com/go-co-op/gocron/v2 v2.20.0
github.com/go-enry/go-enry/v2 v2.9.6
github.com/go-git/go-billy/v5 v5.8.0
github.com/go-git/go-git/v5 v5.17.2
github.com/go-ldap/ldap/v3 v3.4.13
github.com/go-redsync/redsync/v4 v4.16.0
github.com/go-sql-driver/mysql v1.9.3
github.com/go-webauthn/webauthn v0.16.1
github.com/go-webauthn/webauthn v0.16.3
github.com/goccy/go-json v0.10.6
github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f
github.com/gogs/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85
github.com/golang-jwt/jwt/v5 v5.3.1
github.com/google/go-github/v84 v84.0.0
github.com/google/licenseclassifier/v2 v2.0.0
github.com/google/pprof v0.0.0-20260302011040-a15ffb7f9dcc
github.com/google/pprof v0.0.0-20260402051712-545e8a4df936
github.com/google/uuid v1.6.0
github.com/gorilla/feeds v1.2.0
github.com/gorilla/sessions v1.4.0
@@ -75,15 +75,15 @@ require (
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
github.com/klauspost/compress v1.18.5
github.com/klauspost/cpuid/v2 v2.3.0
github.com/lib/pq v1.12.1
github.com/lib/pq v1.12.3
github.com/markbates/goth v1.82.0
github.com/mattn/go-isatty v0.0.20
github.com/mattn/go-sqlite3 v1.14.38
github.com/mattn/go-isatty v0.0.21
github.com/mattn/go-sqlite3 v1.14.42
github.com/meilisearch/meilisearch-go v0.36.1
github.com/mholt/archives v0.1.5
github.com/microcosm-cc/bluemonday v1.0.27
github.com/microsoft/go-mssqldb v1.9.6
github.com/minio/minio-go/v7 v7.0.99
github.com/minio/minio-go/v7 v7.0.100
github.com/msteinert/pam/v2 v2.1.0
github.com/nektos/act v0.2.63
github.com/niklasfasching/go-org v1.9.1
@@ -116,9 +116,9 @@ require (
golang.org/x/net v0.52.0
golang.org/x/oauth2 v0.36.0
golang.org/x/sync v0.20.0
golang.org/x/sys v0.42.0
golang.org/x/sys v0.43.0
golang.org/x/text v0.35.0
google.golang.org/grpc v1.79.3
google.golang.org/grpc v1.80.0
google.golang.org/protobuf v1.36.11
gopkg.in/ini.v1 v1.67.1
gopkg.in/yaml.v3 v3.0.1

44
go.sum
View File

@@ -96,8 +96,8 @@ 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/aws/aws-sdk-go-v2 v1.41.5 h1:dj5kopbwUsVUVFgO4Fi5BIT3t4WyqIDjGKCangnV/yY=
github.com/aws/aws-sdk-go-v2 v1.41.5/go.mod h1:mwsPRE8ceUUpiTgF7QmQIJ7lgsKUPQOUl3o72QBrE1o=
github.com/aws/aws-sdk-go-v2/credentials v1.19.13 h1:mA59E3fokBvyEGHKFdnpNNrvaR351cqiHgRg+JzOSRI=
github.com/aws/aws-sdk-go-v2/credentials v1.19.13/go.mod h1:yoTXOQKea18nrM69wGF9jBdG4WocSZA1h38A+t/MAsk=
github.com/aws/aws-sdk-go-v2/credentials v1.19.14 h1:n+UcGWAIZHkXzYt87uMFBv/l8THYELoX6gVcUvgl6fI=
github.com/aws/aws-sdk-go-v2/credentials v1.19.14/go.mod h1:cJKuyWB59Mqi0jM3nFYQRmnHVQIcgoxjEMAbLkpr62w=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.21 h1:Rgg6wvjjtX8bNHcvi9OnXWwcE0a2vGpbwmtICOsvcf4=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.21/go.mod h1:A/kJFst/nm//cyqonihbdpQZwiUhhzpqTsdbhDdRF9c=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.21 h1:PEgGVtPoB6NTpPrBgqSE5hE/o47Ij9qk/SEZFbUOe9A=
@@ -290,10 +290,10 @@ github.com/go-chi/chi/v5 v5.2.5 h1:Eg4myHZBjyvJmAFjFvWgrqDTXFyOzjj7YIm3L3mu6Ug=
github.com/go-chi/chi/v5 v5.2.5/go.mod h1:X7Gx4mteadT3eDOMTsXzmI4/rwUpOwBHLpAfupzFJP0=
github.com/go-chi/cors v1.2.2 h1:Jmey33TE+b+rB7fT8MUy1u0I4L+NARQlK6LhzKPSyQE=
github.com/go-chi/cors v1.2.2/go.mod h1:sSbTewc+6wYHBBCW7ytsFSn836hqM7JxpglAy2Vzc58=
github.com/go-co-op/gocron/v2 v2.19.1 h1:B4iLeA0NB/2iO3EKQ7NfKn5KsQgZfjb2fkvoZJU3yBI=
github.com/go-co-op/gocron/v2 v2.19.1/go.mod h1:5lEiCKk1oVJV39Zg7/YG10OnaVrDAV5GGR6O0663k6U=
github.com/go-enry/go-enry/v2 v2.9.5 h1:HPhAQQHYwJgihL2PxBZiUMFWiROsGwOBdB6/D8zCUhY=
github.com/go-enry/go-enry/v2 v2.9.5/go.mod h1:9yrj4ES1YrbNb1Wb7/PWYr2bpaCXUGRt0uafN0ISyG8=
github.com/go-co-op/gocron/v2 v2.20.0 h1:9IMrnnVSWjfSh3E54gWmWCHbloQJLh6f9+nwyKfLNpc=
github.com/go-co-op/gocron/v2 v2.20.0/go.mod h1:5lEiCKk1oVJV39Zg7/YG10OnaVrDAV5GGR6O0663k6U=
github.com/go-enry/go-enry/v2 v2.9.6 h1:np63eOtMV56zfYDHnFVgpEVOk8fr2kmylcMnAZUDbSs=
github.com/go-enry/go-enry/v2 v2.9.6/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-fed/httpsig v1.1.1-0.20201223112313-55836744818e h1:oRq/fiirun5HqlEWMLIcDmLpIELlG4iGbd0s8iqgPi8=
@@ -327,8 +327,8 @@ github.com/go-test/deep v1.1.1 h1:0r/53hagsehfO4bzD2Pgr/+RgHqhmf+k1Bpse2cTu1U=
github.com/go-test/deep v1.1.1/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
github.com/go-viper/mapstructure/v2 v2.5.0 h1:vM5IJoUAy3d7zRSVtIwQgBj7BiWtMPfmPEgAXnvj1Ro=
github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/go-webauthn/webauthn v0.16.1 h1:x5/SSki5/aIfogaRukqvbg/RXa3Sgxy/9vU7UfFPHKU=
github.com/go-webauthn/webauthn v0.16.1/go.mod h1:RBS+rtQJMkE5VfMQ4diDA2VNrEL8OeUhp4Srz37FHbQ=
github.com/go-webauthn/webauthn v0.16.3 h1:RorP0c6VbaKP0i0Jxf/vAf7EFb2lmdLW8GLKITeaN5A=
github.com/go-webauthn/webauthn v0.16.3/go.mod h1:R2xjJxSPat5PYKg5r6cUmqXgbHtbv4GmF6uGkqFMLNI=
github.com/go-webauthn/x v0.2.2 h1:zIiipvMbr48CXi5RG0XdBJR94kd8I5LfzHPb/q+YYmk=
github.com/go-webauthn/x v0.2.2/go.mod h1:IpJ5qyWB9NRhLX3C7gIfjTU7RZLXEP6kzFkoVSE7Fz4=
github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM=
@@ -391,8 +391,8 @@ github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/
github.com/google/licenseclassifier/v2 v2.0.0 h1:1Y57HHILNf4m0ABuMVb6xk4vAJYEUO0gDxNpog0pyeA=
github.com/google/licenseclassifier/v2 v2.0.0/go.mod h1:cOjbdH0kyC9R22sdQbYsFkto4NGCAc+ZSwbeThazEtM=
github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik=
github.com/google/pprof v0.0.0-20260302011040-a15ffb7f9dcc h1:VBbFa1lDYWEeV5FZKUiYKYT0VxCp9twUmmaq9eb8sXw=
github.com/google/pprof v0.0.0-20260302011040-a15ffb7f9dcc/go.mod h1:MxpfABSjhmINe3F1It9d+8exIHFvUqtLIRCdOGNXqiI=
github.com/google/pprof v0.0.0-20260402051712-545e8a4df936 h1:EwtI+Al+DeppwYX2oXJCETMO23COyaKGP6fHVpkpWpg=
github.com/google/pprof v0.0.0-20260402051712-545e8a4df936/go.mod h1:MxpfABSjhmINe3F1It9d+8exIHFvUqtLIRCdOGNXqiI=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
@@ -498,8 +498,8 @@ github.com/letsencrypt/challtestsrv v1.4.2 h1:0ON3ldMhZyWlfVNYYpFuWRTmZNnyfiL9Hh
github.com/letsencrypt/challtestsrv v1.4.2/go.mod h1:GhqMqcSoeGpYd5zX5TgwA6er/1MbWzx/o7yuuVya+Wk=
github.com/letsencrypt/pebble/v2 v2.10.0 h1:Wq6gYXlsY6ubqI3hhxsTzdyotvfdjFBxuwYqCLCnj/U=
github.com/letsencrypt/pebble/v2 v2.10.0/go.mod h1:Sk8cmUIPcIdv2nINo+9PB4L+ZBhzY+F9A1a/h/xmWiQ=
github.com/lib/pq v1.12.1 h1:x1nbl/338GLqeDJ/FAiILallhAsqubLzEZu/pXtHUow=
github.com/lib/pq v1.12.1/go.mod h1:/p+8NSbOcwzAEI7wiMXFlgydTwcgTr3OSKMsD2BitpA=
github.com/lib/pq v1.12.3 h1:tTWxr2YLKwIvK90ZXEw8GP7UFHtcbTtty8zsI+YjrfQ=
github.com/lib/pq v1.12.3/go.mod h1:/p+8NSbOcwzAEI7wiMXFlgydTwcgTr3OSKMsD2BitpA=
github.com/libdns/libdns v1.1.1 h1:wPrHrXILoSHKWJKGd0EiAVmiJbFShguILTg9leS/P/U=
github.com/libdns/libdns v1.1.1/go.mod h1:4Bj9+5CQiNMVGf87wjX4CY3HQJypUHRuLvlsfsZqLWQ=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
@@ -512,14 +512,14 @@ github.com/markbates/goth v1.82.0 h1:8j/c34AjBSTNzO7zTsOyP5IYCQCMBTRBHAbBt/PI0bQ
github.com/markbates/goth v1.82.0/go.mod h1:/DRlcq0pyqkKToyZjsL2KgiA1zbF1HIjE7u2uC79rUk=
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-isatty v0.0.21 h1:xYae+lCNBP7QuW4PUnNG61ffM4hVIfm+zUzDuSzYLGs=
github.com/mattn/go-isatty v0.0.21/go.mod h1:ZXfXG4SQHsB/w3ZeOYbR0PrPwLy+n6xiMrJlRFqopa4=
github.com/mattn/go-runewidth v0.0.21 h1:jJKAZiQH+2mIinzCJIaIG9Be1+0NR+5sz/lYEEjdM8w=
github.com/mattn/go-runewidth v0.0.21/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=
github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk=
github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
github.com/mattn/go-sqlite3 v1.14.38 h1:tDUzL85kMvOrvpCt8P64SbGgVFtJB11GPi2AdmITgb4=
github.com/mattn/go-sqlite3 v1.14.38/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
github.com/mattn/go-sqlite3 v1.14.42 h1:MigqEP4ZmHw3aIdIT7T+9TLa90Z6smwcthx+Azv4Cgo=
github.com/mattn/go-sqlite3 v1.14.42/go.mod h1:pjEuOr8IwzLJP2MfGeTb0A35jauH+C2kbHKBr7yXKVQ=
github.com/meilisearch/meilisearch-go v0.36.1 h1:mJTCJE5g7tRvaqKco6DfqOuJEjX+rRltDEnkEC02Y0M=
github.com/meilisearch/meilisearch-go v0.36.1/go.mod h1:hWcR0MuWLSzHfbz9GGzIr3s9rnXLm1jqkmHkJPbUSvM=
github.com/mholt/acmez/v3 v3.1.6 h1:eGVQNObP0pBN4sxqrXeg7MYqTOWyoiYpQqITVWlrevk=
@@ -538,8 +538,8 @@ github.com/minio/crc64nvme v1.1.1 h1:8dwx/Pz49suywbO+auHCBpCtlW1OfpcLN7wYgVR6wAI
github.com/minio/crc64nvme v1.1.1/go.mod h1:eVfm2fAzLlxMdUGc0EEBGSMmPwmXD5XiNRpnu9J3bvg=
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM=
github.com/minio/minio-go/v7 v7.0.99 h1:2vH/byrwUkIpFQFOilvTfaUpvAX3fEFhEzO+DR3DlCE=
github.com/minio/minio-go/v7 v7.0.99/go.mod h1:EtGNKtlX20iL2yaYnxEigaIvj0G0GwSDnifnG8ClIdw=
github.com/minio/minio-go/v7 v7.0.100 h1:ShkWi8Tyj9RtU57OQB2HIXKz4bFgtVib0bbT1sbtLI8=
github.com/minio/minio-go/v7 v7.0.100/go.mod h1:EtGNKtlX20iL2yaYnxEigaIvj0G0GwSDnifnG8ClIdw=
github.com/minio/minlz v1.1.0 h1:rUOGu3EP4EqJC5k3qCsIwEnZiJULKqtRyDdqbhlvMmQ=
github.com/minio/minlz v1.1.0/go.mod h1:qT0aEB35q79LLornSzeDH75LBf3aH1MV+jB5w9Wasec=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
@@ -868,8 +868,8 @@ golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo=
golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI=
golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
@@ -914,8 +914,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260401020348-3a24fdc17823 h1:YedBIttDguBl/zy2wJauEUm+DZZg4UXseWj0g/3N+yo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260401020348-3a24fdc17823/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=
google.golang.org/grpc v1.79.3 h1:sybAEdRIEtvcD68Gx7dmnwjZKlyfuc61Dyo9pGXXkKE=
google.golang.org/grpc v1.79.3/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ=
google.golang.org/grpc v1.80.0 h1:Xr6m2WmWZLETvUNvIUmeD5OAagMw3FiKmMlTdViWsHM=
google.golang.org/grpc v1.80.0/go.mod h1:ho/dLnxwi3EDJA4Zghp7k2Ec1+c2jqup0bFkw07bwF4=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=

View File

@@ -177,3 +177,5 @@
user_id: 40
repo_id: 1
mode: 2
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -31,3 +31,5 @@
created_unix: 946687980
updated_unix: 946687980
# commented out tokens so you can see what they are in plaintext
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -73,3 +73,5 @@
is_private: false
created_unix: 1680454039
content: '4|' # issueId 5
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -177,3 +177,5 @@
created_unix: 1730330775
updated_unix: 1730330775
expired_unix: 1738106775
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -160,3 +160,5 @@
updated: 1683636626
need_approval: 0
approved_by: 0
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -144,3 +144,5 @@
status: 3
started: 1683636528
stopped: 1683636626
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -49,3 +49,5 @@
repo_id: 0
description: "This runner is going to be deleted"
agent_labels: '["runner_to_be_deleted","linux"]'
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -33,3 +33,5 @@
is_active: 1
created: 1695617751
updated: 1695617751
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -197,3 +197,5 @@
log_length: 707
log_size: 90179
log_expired: 0
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -18,3 +18,5 @@
task_id: 50
output_key: output_b
output_value: bbb
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -166,3 +166,5 @@
download_count: 0
size: 0
created_unix: 946684800
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -3,3 +3,5 @@
slug: badge1
description: just a test badge
image_url: badge1.png
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -249,3 +249,5 @@
is_deleted: false
deleted_by_id: 0
deleted_unix: 0
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -63,3 +63,5 @@
repo_id: 32
user_id: 10
mode: 2 # write
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -102,3 +102,5 @@
review_id: 22
assignee_id: 5
created_unix: 946684817
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -57,3 +57,5 @@
context: deploy/awesomeness
context_hash: ae9547713a6665fc4261d0756904932085a41cf2
creator_id: 2
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -3,3 +3,5 @@
repo_id: 1
sha: "1234123412341234123412341234123412341234"
max_index: 5
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -1 +1,3 @@
[] # empty
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -317,3 +317,5 @@
lower_email: user40@example.com
is_activated: true
is_primary: true
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -1 +1,3 @@
[] # empty
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -17,3 +17,5 @@
id: 4
user_id: 31
follow_id: 33
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -21,3 +21,5 @@
can_encrypt_comms: true
can_encrypt_storage: true
can_certify: true
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -1 +1,3 @@
[] # empty
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -35,3 +35,5 @@
"X-Head": "42"
}
}
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -372,3 +372,5 @@
created_unix: 1707270422
updated_unix: 1707270422
is_locked: false
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -18,3 +18,5 @@
id: 5
assignee_id: 10
issue_id: 6
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -33,3 +33,5 @@
-
group_id: 51
max_index: 1
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -17,3 +17,5 @@
id: 4
issue_id: 2
label_id: 4
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -4,3 +4,5 @@
issue_id: 4
is_pull: false
pin_order: 1
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -18,3 +18,5 @@
issue_id: 1
is_read: false
is_mentioned: true
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -29,3 +29,5 @@
is_watching: false
created_unix: 946684800
updated_unix: 946684800
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -107,3 +107,5 @@
num_issues: 0
num_closed_issues: 0
archived_unix: 0
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -30,3 +30,5 @@
size: 25
repository_id: 54
created_unix: 1671607299
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -1 +1,3 @@
[] # empty
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -52,3 +52,5 @@
num_closed_issues: 0
completeness: 0
deadline_unix: 253370764800
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -47,3 +47,5 @@
next_update_unix: 0
lfs_enabled: false
lfs_endpoint: ""
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -12,3 +12,5 @@
id: 3
type: 1 # NoticeRepository
description: description3
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -52,3 +52,5 @@
issue_id: 4
created_unix: 946688800
updated_unix: 946688820
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -18,3 +18,5 @@
created_unix: 1546869730
updated_unix: 1546869730
confidential_client: false
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -13,3 +13,5 @@
code_challenge_method: "S256"
redirect_uri: "http://127.0.0.1/"
valid_until: 3546869730
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -29,3 +29,5 @@
scope: "whatever"
created_unix: 1546869730
updated_unix: 1546869730
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -135,3 +135,5 @@
uid: 20
org_id: 17
is_public: false
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -69,3 +69,5 @@
type: 2
created_unix: 1688973000
updated_unix: 1688973000
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -75,3 +75,5 @@
default: true
created_unix: 1588117528
updated_unix: 1588117528
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -21,3 +21,5 @@
issue_id: 5
project_id: 1
project_board_id: 3
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -1 +1,3 @@
[] # empty
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -22,3 +22,5 @@
allowlist_team_i_ds: "[]"
created_unix: 1715596037
updated_unix: 1715596037
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -10,3 +10,5 @@
updated_unix: 1565224552
login_source_id: 0
verified: false
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -117,3 +117,5 @@
index: 1
head_repo_id: 61
base_repo_id: 61
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -37,3 +37,5 @@
comment_id: 2
user_id: 1
created_unix: 1573248005
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -150,3 +150,5 @@
is_prerelease: false
is_tag: false
created_unix: 946684803
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -3,3 +3,5 @@
repo_id: 1
from: dev
to: master
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -1 +1,3 @@
[] # empty
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -1 +1,3 @@
[] # empty
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -1 +1,3 @@
[] # empty
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -3,3 +3,5 @@
owner_id: 2
lower_name: oldrepo1
redirect_repo_id: 1
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -25,3 +25,5 @@
-
repo_id: 2
topic_id: 6
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -29,3 +29,5 @@
repo_id: 5
created_unix: 1553610671
updated_unix: 1553610671
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -747,3 +747,5 @@
type: 10
config: "{}"
created_unix: 946684810
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -1788,3 +1788,5 @@
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -214,3 +214,5 @@
original_author_id: 0
updated_unix: 946684817
created_unix: 946684817
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -17,3 +17,5 @@
id: 4
uid: 10
repo_id: 32
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -9,3 +9,5 @@
user_id: 2
issue_id: 2
created_unix: 1500988002
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -13,3 +13,5 @@
version: 1
created: 1653533198
updated: 1653533198
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -261,3 +261,5 @@
num_members: 1
includes_all_repositories: true
can_create_org_repo: false
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -75,3 +75,5 @@
org_id: 41
team_id: 22
repo_id: 61
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -340,3 +340,5 @@
team_id: 24
type: 1 # code
access_mode: 2
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -159,3 +159,5 @@
org_id: 35
team_id: 24
uid: 2
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -27,3 +27,5 @@
id: 6
name: topicname2
repo_count: 2
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -69,3 +69,5 @@
time: 100000
created_unix: 947688815
deleted: true
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -7,3 +7,5 @@
last_used_passcode:
created_unix: 1564253724
updated_unix: 1564253724
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -1556,3 +1556,5 @@
repo_admin_change_team_access: false
theme: ""
keep_activity_private: false
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -17,3 +17,5 @@
id: 4
blocker_id: 50
blockee_id: 34
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -15,3 +15,5 @@
uid: 2
uri: https://domain1.tld/user2/
show: true
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -6,3 +6,5 @@
id: 2
lower_name: olduser2
redirect_user_id: 2
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -39,3 +39,5 @@
user_id: 10
repo_id: 32
mode: 1 # normal
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -7,3 +7,5 @@
clone_warning: false
created_unix: 946684800
updated_unix: 946684800
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -50,3 +50,5 @@
events: '{"push_only":true,"branch_filter":"{master,feature*}"}'
is_active: true
is_system_webhook: false
# DO NOT add more test data in the fixtures, test case should prepare their own test data separately and clearly

View File

@@ -18,7 +18,14 @@ import (
// GetOrgRepositories get repos belonging to the given organization
func GetOrgRepositories(ctx context.Context, orgID int64) (RepositoryList, error) {
var orgRepos []*Repository
return orgRepos, db.GetEngine(ctx).Where("owner_id = ?", orgID).Find(&orgRepos)
err := db.GetEngine(ctx).Where("owner_id = ?", orgID).Find(&orgRepos)
return orgRepos, err
}
// GetOrgRepositoryIDs get repo IDs belonging to the given organization
func GetOrgRepositoryIDs(ctx context.Context, orgID int64) (repoIDs []int64, _ error) {
err := db.GetEngine(ctx).Table("repository").Where("owner_id = ?", orgID).Cols("id").Find(&repoIDs)
return repoIDs, err
}
type SearchTeamRepoOptions struct {
@@ -26,7 +33,7 @@ type SearchTeamRepoOptions struct {
TeamID int64
}
// GetRepositories returns paginated repositories in team of organization.
// GetTeamRepositories returns paginated repositories in team of organization.
func GetTeamRepositories(ctx context.Context, opts *SearchTeamRepoOptions) (RepositoryList, error) {
sess := db.GetEngine(ctx)
if opts.TeamID > 0 {

View File

@@ -173,6 +173,8 @@
"search.org_kind": "Cuardaigh eagraíochtaí…",
"search.team_kind": "Cuardaigh foirne…",
"search.code_kind": "Cuardaigh cód…",
"search.code_empty": "Tosaigh cuardach cóid.",
"search.code_empty_description": "Cuir isteach eochairfhocal chun cuardach a dhéanamh ar fud an chóid.",
"search.code_search_unavailable": "Níl cuardach cód ar fáil faoi láthair. Déan teagmháil le riarthóir an láithreáin.",
"search.code_search_by_git_grep": "Soláthraíonn “git grep” torthaí cuardaigh cód reatha. D'fhéadfadh torthaí níos fearr a bheith ann má chuireann riarthóir an láithreáin ar chumas Innéacsaithe",
"search.package_kind": "Cuardaigh pacáistí…",
@@ -1216,7 +1218,7 @@
"repo.ambiguous_runes_description": "Tá carachtair Unicode sa chomhad seo a d'fhéadfadh a bheith mearbhall le carachtair eile. Má cheapann tú go bhfuil sé seo d'aon ghnó, is féidir leat neamhaird a dhéanamh go sábháilte don rabhadh seo Úsáid an cnaipe Escape chun iad a nochtadh. ",
"repo.invisible_runes_line": "Tá carachtair unicode dofheicthe ag an líne seo ",
"repo.ambiguous_runes_line": "Tá carachtair unicode débhríoch ag an líne seo ",
"repo.ambiguous_character": "Is féidir %[1]c [U+%04[1]X] a mheascadh le %[2]c [U+%04[2]X]",
"repo.ambiguous_character": "Is féidir mearbhall a dhéanamh idir %[1]s agus %[2]s",
"repo.escape_control_characters": "Éalú",
"repo.unescape_control_characters": "Dí-Éalú",
"repo.file_copy_permalink": "Cóipeáil Buan-nasc",
@@ -1357,10 +1359,13 @@
"repo.projects.desc": "Saincheisteanna a bhainistiú agus tionscadail a tharraingt isteach.",
"repo.projects.description": "Cur síos (roghnach)",
"repo.projects.description_placeholder": "Cur síos",
"repo.projects.empty": "Gan aon tionscadail go fóill.",
"repo.projects.empty_description": "Cruthaigh tionscadal chun saincheisteanna agus iarratais tarraingthe a chomhordú.",
"repo.projects.create": "Cruthaigh Tionscadal",
"repo.projects.title": "Teideal",
"repo.projects.new": "Tionscadal Nua",
"repo.projects.new_subheader": "Déan do chuid oibre a chomhordú, a rianú agus a nuashonrú in aon áit amháin, ionas go bhfanann na tionscadail trédhearcach agus de réir sceidil.",
"repo.projects.no_results": "Níl aon tionscadail a oireann do do chuardach.",
"repo.projects.create_success": "Tá an tionscadal \"%s\" cruthaithe.",
"repo.projects.deletion": "Scrios tionscadal",
"repo.projects.deletion_desc": "Má scriostar tionscadal, bainfear de gach saincheist a bhaineann leis é. Lean ort?",
@@ -2722,6 +2727,8 @@
"org.members": "Comhaltaí",
"org.teams": "Foirne",
"org.code": "Cód",
"org.repos.empty": "Gan aon stórtha fós.",
"org.repos.empty_description": "Cruthaigh stórlann chun cód a roinnt leis an eagraíocht.",
"org.lower_members": "comhaltaí",
"org.lower_repositories": "stórais",
"org.create_new_team": "Foireann Nua",
@@ -2858,6 +2865,8 @@
"org.worktime.date_range_end": "Dáta deiridh",
"org.worktime.query": "Ceist",
"org.worktime.time": "Am",
"org.worktime.empty": "Gan aon sonraí ama oibre go fóill.",
"org.worktime.empty_description": "Coigeartaigh an raon dáta chun an t-am rianaithe a fheiceáil.",
"org.worktime.by_repositories": "De réir stórtha",
"org.worktime.by_milestones": "De réir clocha míle",
"org.worktime.by_members": "Ag baill",
@@ -3506,6 +3515,7 @@
"packages.dependencies": "Spleithiúlachtaí",
"packages.keywords": "Eochairfhocail",
"packages.details": "Sonraí",
"packages.name": "Ainm an Phacáiste",
"packages.details.author": "Údar",
"packages.details.project_site": "Suíomh an Tionscadail",
"packages.details.repository_site": "Suíomh Stóras",
@@ -3601,6 +3611,18 @@
"packages.swift.registry": "Socraigh an clárlann seo ón líne ordaithe:",
"packages.swift.install": "Cuir an pacáiste i do <code>chomhad Package.swift</code>:",
"packages.swift.install2": "agus reáchtáil an t-ordú seo a leanas:",
"packages.terraform.install": "Socraigh do stát chun an cúltaca HTTP a úsáid",
"packages.terraform.install2": "agus reáchtáil an t-ordú seo a leanas:",
"packages.terraform.lock_status": "Stádas Glas",
"packages.terraform.locked_by": "Glasáilte ag %s",
"packages.terraform.unlocked": "Díghlasáilte",
"packages.terraform.lock": "Glas",
"packages.terraform.unlock": "Díghlasáil",
"packages.terraform.lock.success": "Glasáladh staid Terraform go rathúil.",
"packages.terraform.unlock.success": "Díghlasáladh staid Terraform go rathúil.",
"packages.terraform.lock.error.already_locked": "Tá staid Terraform faoi ghlas cheana féin.",
"packages.terraform.delete.locked": "Tá staid an Terraform faoi ghlas agus ní féidir é a scriosadh.",
"packages.terraform.delete.latest": "Ní féidir an leagan is déanaí de staid Terraform a scriosadh.",
"packages.vagrant.install": "Chun bosca Vagrant a chur leis, reáchtáil an t-ordú seo a leanas:",
"packages.settings.link": "Nasc an pacáiste seo le stóras",
"packages.settings.link.description": "Má nascann tú pacáiste le stórlann, beidh an pacáiste le feiceáil i liosta pacáistí an stórlainne. Ní féidir ach stórlanna faoin úinéir céanna a nascadh. Má fhágtar an réimse folamh, bainfear an nasc.",
@@ -3614,8 +3636,13 @@
"packages.settings.delete": "Scrios pacáiste",
"packages.settings.delete.description": "Tá pacáiste a scriosadh buan agus ní féidir é a chur ar ais.",
"packages.settings.delete.notice": "Tá tú ar tí %s (%s) a scriosadh. Tá an oibríocht seo dochúlaithe, an bhfuil tú cinnte?",
"packages.settings.delete.notice.package": "Tá tú ar tí %s agus a leaganacha uile a scriosadh. Ní féidir an oibríocht seo a aisiompú, an bhfuil tú cinnte?",
"packages.settings.delete.success": "Tá an pacáiste scriosta.",
"packages.settings.delete.version.success": "Scriosadh an leagan pacáiste.",
"packages.settings.delete.error": "Theip ar an pacáiste a scriosadh.",
"packages.settings.delete.version": "Scrios an leagan",
"packages.settings.delete.confirm": "Cuir isteach ainm an phacáiste le deimhniú",
"packages.settings.delete.invalid_package_name": "Tá ainm an phacáiste a chuir tú isteach mícheart.",
"packages.owner.settings.cargo.title": "Innéacs Clárlann Lasta",
"packages.owner.settings.cargo.initialize": "Innéacs a chur i dtosach",
"packages.owner.settings.cargo.initialize.description": "Tá gá le stóras innéacs speisialta Git chun an clárlann Cargo a úsáid. Tríd an rogha seo, cruthófar an stóras (nó athchruthófar é) agus cumrófar é go huathoibríoch.",

View File

@@ -48,20 +48,20 @@
"dayjs": "1.11.20",
"dropzone": "6.0.0-beta.2",
"easymde": "2.20.0",
"esbuild": "0.27.4",
"esbuild": "0.28.0",
"htmx.org": "2.0.8",
"idiomorph": "0.7.4",
"jquery": "4.0.0",
"js-yaml": "4.1.1",
"katex": "0.16.44",
"katex": "0.16.45",
"mermaid": "11.14.0",
"online-3d-viewer": "0.18.0",
"pdfobject": "2.3.1",
"perfect-debounce": "2.1.0",
"postcss": "8.5.8",
"postcss": "8.5.9",
"rollup-plugin-license": "3.7.0",
"sortablejs": "1.15.7",
"swagger-ui-dist": "5.32.1",
"swagger-ui-dist": "5.32.2",
"tailwindcss": "3.4.19",
"throttle-debounce": "5.0.2",
"tippy.js": "6.3.7",
@@ -69,9 +69,9 @@
"tributejs": "5.1.3",
"uint8-to-base64": "0.2.1",
"vanilla-colorful": "0.7.2",
"vite": "8.0.5",
"vite": "8.0.7",
"vite-string-plugin": "2.0.2",
"vue": "3.5.31",
"vue": "3.5.32",
"vue-bar-graph": "2.2.0",
"vue-chartjs": "5.3.3",
"wrap-ansi": "10.0.0"
@@ -79,7 +79,7 @@
"devDependencies": {
"@eslint-community/eslint-plugin-eslint-comments": "4.7.1",
"@eslint/json": "1.2.0",
"@playwright/test": "1.59.0",
"@playwright/test": "1.59.1",
"@stylistic/eslint-plugin": "5.10.0",
"@stylistic/stylelint-plugin": "5.1.0",
"@types/codemirror": "5.60.17",
@@ -87,16 +87,16 @@
"@types/jquery": "4.0.0",
"@types/js-yaml": "4.0.9",
"@types/katex": "0.16.8",
"@types/node": "25.5.0",
"@types/node": "25.5.2",
"@types/pdfobject": "2.2.5",
"@types/sortablejs": "1.15.9",
"@types/swagger-ui-dist": "3.30.6",
"@types/throttle-debounce": "5.0.2",
"@types/toastify-js": "1.12.4",
"@typescript-eslint/parser": "8.58.0",
"@typescript-eslint/parser": "8.58.1",
"@vitejs/plugin-vue": "6.0.5",
"@vitest/eslint-plugin": "1.6.14",
"eslint": "10.1.0",
"eslint": "10.2.0",
"eslint-import-resolver-typescript": "4.4.4",
"eslint-plugin-array-func": "5.1.1",
"eslint-plugin-de-morgan": "2.1.1",
@@ -124,9 +124,9 @@
"stylelint-value-no-unknown-custom-properties": "6.1.1",
"svgo": "4.0.1",
"typescript": "6.0.2",
"typescript-eslint": "8.58.0",
"updates": "17.13.1",
"vitest": "4.1.2",
"typescript-eslint": "8.58.1",
"updates": "17.13.5",
"vitest": "4.1.3",
"vue-tsc": "3.2.6"
},
"pnpm": {
@@ -151,7 +151,9 @@
"safe-regex-test": "npm:@nolyfill/safe-regex-test@^1",
"safer-buffer": "npm:@nolyfill/safer-buffer@^1",
"string.prototype.includes": "npm:@nolyfill/string.prototype.includes@^1",
"string.prototype.trimend": "npm:@nolyfill/string.prototype.trimend@^1"
"string.prototype.trimend": "npm:@nolyfill/string.prototype.trimend@^1",
"object-keys": "npm:@nolyfill/object-keys@^1",
"object.entries": "npm:@nolyfill/object.entries@^1"
}
}
}

1567
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -1610,7 +1610,8 @@ func Routes() *web.Router {
Delete(reqToken(), reqOrgOwnership(), org.Delete)
m.Post("/rename", reqToken(), reqOrgOwnership(), bind(api.RenameOrgOption{}), org.Rename)
m.Combo("/repos").Get(user.ListOrgRepos).
Post(reqToken(), bind(api.CreateRepoOption{}), repo.CreateOrgRepo)
Post(reqToken(), bind(api.CreateRepoOption{}), repo.CreateOrgRepo).
Delete(reqToken(), reqOrgOwnership(), tokenRequiresScopes(auth_model.AccessTokenScopeCategoryRepository), org.DeleteOrgRepos)
m.Group("/members", func() {
m.Get("", reqToken(), org.ListMembers)
m.Combo("/{username}").Get(reqToken(), org.IsMember).

View File

@@ -5,14 +5,20 @@
package org
import (
gocontext "context"
"errors"
"fmt"
"net/http"
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/perm"
repo_model "code.gitea.io/gitea/models/repo"
system_model "code.gitea.io/gitea/models/system"
user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/graceful"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/optional"
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/util"
@@ -23,6 +29,7 @@ import (
"code.gitea.io/gitea/services/convert"
feed_service "code.gitea.io/gitea/services/feed"
"code.gitea.io/gitea/services/org"
repo_service "code.gitea.io/gitea/services/repository"
user_service "code.gitea.io/gitea/services/user"
)
@@ -497,3 +504,70 @@ func ListOrgActivityFeeds(ctx *context.APIContext) {
ctx.JSON(http.StatusOK, convert.ToActivities(ctx, feeds, ctx.Doer))
}
func deleteOrgReposBackground(ctx gocontext.Context, org *organization.Organization, repoIDs []int64, doer *user_model.User) {
defer func() {
if r := recover(); r != nil {
log.Error("panic during org repo deletion: %v, stack: %v", r, log.Stack(2))
}
}()
for _, repoID := range repoIDs {
repo, err := repo_model.GetRepositoryByID(ctx, repoID)
if err != nil {
desc := fmt.Sprintf("Failed to get repository ID %d in org %s: %v", repoID, org.Name, err)
_ = system_model.CreateNotice(ctx, system_model.NoticeRepository, desc)
log.Error("GetRepositoryByID failed: %v", desc)
continue
}
if err := repo_service.DeleteRepository(ctx, doer, repo, true); err != nil {
desc := fmt.Sprintf("Failed to delete repository %s (ID: %d) in org %s: %v", repo.Name, repo.ID, org.Name, err)
_ = system_model.CreateNotice(ctx, system_model.NoticeRepository, desc)
log.Error("DeleteRepository failed: %v", desc)
continue
}
log.Info("Successfully deleted repository %s (ID: %d) in org %s", repo.Name, repo.ID, org.Name)
}
log.Info("Completed deletion of repositories in org %s", org.Name)
}
func DeleteOrgRepos(ctx *context.APIContext) {
// swagger:operation DELETE /orgs/{org}/repos organization orgDeleteRepos
// ---
// summary: Delete all repositories in an organization
// produces:
// - application/json
// parameters:
// - name: org
// in: path
// description: name of the organization
// type: string
// required: true
// responses:
// "202":
// "$ref": "#/responses/empty"
// "204":
// "$ref": "#/responses/empty"
// "403":
// "$ref": "#/responses/forbidden"
// "404":
// "$ref": "#/responses/notFound"
// Intentionally it only loads repository IDs to avoid loading too much data into memory
// There is no need to do pagination here as the number of repositories is expected to be manageable
repoIDs, err := repo_model.GetOrgRepositoryIDs(ctx, ctx.Org.Organization.ID)
if err != nil {
ctx.APIErrorInternal(err)
return
}
if len(repoIDs) == 0 {
ctx.Status(http.StatusNoContent)
return
}
// Start deletion (slow) in background with detached context, so it can continue even if the request is canceled
go deleteOrgReposBackground(graceful.GetManager().ShutdownContext(), ctx.Org.Organization, repoIDs, ctx.Doer)
ctx.Status(http.StatusAccepted)
}

View File

@@ -3633,6 +3633,39 @@
"$ref": "#/responses/notFound"
}
}
},
"delete": {
"produces": [
"application/json"
],
"tags": [
"organization"
],
"summary": "Delete all repositories in an organization",
"operationId": "orgDeleteRepos",
"parameters": [
{
"type": "string",
"description": "name of the organization",
"name": "org",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"$ref": "#/responses/empty"
},
"204": {
"$ref": "#/responses/empty"
},
"403": {
"$ref": "#/responses/forbidden"
},
"404": {
"$ref": "#/responses/notFound"
}
}
}
},
"/orgs/{org}/teams": {

View File

@@ -8,10 +8,12 @@ import (
"net/http"
"strings"
"testing"
"time"
auth_model "code.gitea.io/gitea/models/auth"
org_model "code.gitea.io/gitea/models/organization"
"code.gitea.io/gitea/models/perm"
repo_model "code.gitea.io/gitea/models/repo"
unit_model "code.gitea.io/gitea/models/unit"
"code.gitea.io/gitea/models/unittest"
user_model "code.gitea.io/gitea/models/user"
@@ -24,8 +26,14 @@ import (
"github.com/stretchr/testify/require"
)
func TestAPIOrgCreateRename(t *testing.T) {
func TestAPIOrg(t *testing.T) {
defer tests.PrepareTestEnv(t)()
t.Run("General", testAPIOrgGeneral)
t.Run("CreateAndRename", testAPIOrgCreateRename)
t.Run("DeleteOrgRepos", testAPIDeleteOrgRepos)
}
func testAPIOrgCreateRename(t *testing.T) {
token := getUserToken(t, "user1", auth_model.AccessTokenScopeWriteOrganization)
org := api.CreateOrgOption{
@@ -110,8 +118,7 @@ func TestAPIOrgCreateRename(t *testing.T) {
})
}
func TestAPIOrgGeneral(t *testing.T) {
defer tests.PrepareTestEnv(t)()
func testAPIOrgGeneral(t *testing.T) {
user1Session := loginUser(t, "user1")
user1Token := getTokenForLoggedInUser(t, user1Session, auth_model.AccessTokenScopeWriteOrganization)
@@ -260,3 +267,33 @@ func TestAPIOrgGeneral(t *testing.T) {
MakeRequest(t, req, http.StatusForbidden)
})
}
func testAPIDeleteOrgRepos(t *testing.T) {
org3 := unittest.AssertExistsAndLoadBean(t, &user_model.User{Name: "org3"})
orgRepos, err := repo_model.GetOrgRepositories(t.Context(), org3.ID)
require.NoError(t, err)
assert.NotEmpty(t, orgRepos) // this org contains repositories, so we can test the deletion of all org repos
t.Run("NoPermission", func(t *testing.T) {
nonOwnerSession := loginUser(t, "user4")
nonOwnerToken := getTokenForLoggedInUser(t, nonOwnerSession, auth_model.AccessTokenScopeWriteOrganization)
req := NewRequest(t, "DELETE", "/api/v1/orgs/org3/repos").AddTokenAuth(nonOwnerToken)
MakeRequest(t, req, http.StatusForbidden)
})
t.Run("DeleteAllOrgRepos", func(t *testing.T) {
session := loginUser(t, "user1")
token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteOrganization, auth_model.AccessTokenScopeWriteRepository)
req := NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/orgs/%s/repos", org3.Name)).AddTokenAuth(token)
MakeRequest(t, req, http.StatusAccepted)
assert.Eventually(t, func() bool {
repos, err := repo_model.GetOrgRepositories(t.Context(), org3.ID)
require.NoError(t, err)
return len(repos) == 0
}, 2*time.Second, 50*time.Millisecond)
req = NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/orgs/%s/repos", org3.Name)).AddTokenAuth(token)
MakeRequest(t, req, http.StatusNoContent) // The org contains no repositories, so the API should return StatusNoContent
})
}

View File

@@ -1,4 +1,19 @@
import {showGlobalErrorMessage} from './errors.ts';
import {isGiteaError, showGlobalErrorMessage} from './errors.ts';
test('isGiteaError', () => {
expect(isGiteaError('', '')).toBe(true);
expect(isGiteaError('moz-extension://abc/content.js', '')).toBe(false);
expect(isGiteaError('safari-extension://abc/content.js', '')).toBe(false);
expect(isGiteaError('safari-web-extension://abc/content.js', '')).toBe(false);
expect(isGiteaError('chrome-extension://abc/content.js', '')).toBe(false);
expect(isGiteaError('https://other-site.com/script.js', '')).toBe(false);
expect(isGiteaError('http://localhost:3000/some/page', '')).toBe(true);
expect(isGiteaError('http://localhost:3000/assets/js/index.abc123.js', '')).toBe(true);
expect(isGiteaError('', `Error\n at chrome-extension://abc/content.js:1:1`)).toBe(false);
expect(isGiteaError('', `Error\n at https://other-site.com/script.js:1:1`)).toBe(false);
expect(isGiteaError('', `Error\n at http://localhost:3000/assets/js/index.abc123.js:1:1`)).toBe(true);
expect(isGiteaError('http://localhost:3000/assets/js/index.js', `Error\n at chrome-extension://abc/content.js:1:1`)).toBe(false);
});
test('showGlobalErrorMessage', () => {
document.body.innerHTML = '<div class="page-content"></div>';

View File

@@ -23,11 +23,19 @@ export function showGlobalErrorMessage(msg: string, msgType: Intent = 'error') {
msgContainer.prepend(msgDiv);
}
// Detect whether an error originated from Gitea's own scripts, not from
// browser extensions or other external scripts.
const extensionRe = /(chrome|moz|safari(-web)?)-extension:\/\//;
export function isGiteaError(filename: string, stack: string): boolean {
if (extensionRe.test(filename) || extensionRe.test(stack)) return false;
const assetBaseUrl = new URL(`${window.config.assetUrlPrefix}/`, window.location.origin).href;
if (filename && !filename.startsWith(assetBaseUrl) && !filename.startsWith(window.location.origin)) return false;
if (stack && !stack.includes(assetBaseUrl)) return false;
return true;
}
export function processWindowErrorEvent({error, reason, message, type, filename, lineno, colno}: ErrorEvent & PromiseRejectionEvent) {
const err = error ?? reason;
const assetBaseUrl = String(new URL(`${window.config?.assetUrlPrefix ?? '/assets'}/`, window.location.origin));
const {runModeIsProd} = window.config ?? {};
// `error` and `reason` are not guaranteed to be errors. If the value is falsy, it is likely a
// non-critical event from the browser. We log them but don't show them to users. Examples:
// - https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver#observation_errors
@@ -35,12 +43,11 @@ export function processWindowErrorEvent({error, reason, message, type, filename,
// - https://github.com/go-gitea/gitea/issues/20240
if (!err) {
if (message) console.error(new Error(message));
if (runModeIsProd) return;
if (window.config.runModeIsProd) return;
}
// If the error stack trace does not include the base URL of our script assets, it likely came
// from a browser extension or inline script. Do not show such errors in production.
if (err instanceof Error && !err.stack?.includes(assetBaseUrl) && runModeIsProd) return;
// Filter out errors from browser extensions or other non-Gitea scripts.
if (!isGiteaError(filename ?? '', err?.stack ?? '')) return;
let msg = err?.message ?? message;
if (lineno) msg += ` (${filename} @ ${lineno}:${colno})`;

View File

@@ -13,7 +13,7 @@ await import('./globals.ts');
window.config = {
appUrl: 'http://localhost:3000/',
appSubUrl: '',
assetUrlPrefix: '',
assetUrlPrefix: '/assets',
sharedWorkerUri: '',
runModeIsProd: true,
customEmojis: {},