mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-20 19:53:41 +09:00
feat(api): list all packages for site administrators (#38968)
Add `GET /admin/packages` so site administrators can review packages
across every owner without querying each owner separately.
It returns the same package version representation as `GET
/packages/{owner}` and supports `page`, `limit`, `type`, and `q`
filters.
---
Assisted by Codet(DeepSeek)
---------
Signed-off-by: bircni <bircni@icloud.com>
Signed-off-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: bircni <bircni@icloud.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
co-authored by
bircni
wxiaoguang
parent
2d6fea5bdf
commit
f7072b0305
+75
@@ -11685,6 +11685,81 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/admin/packages": {
|
||||
"get": {
|
||||
"operationId": "adminListPackages",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "page number of results to return (1-based)",
|
||||
"in": "query",
|
||||
"name": "page",
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "page size of results",
|
||||
"in": "query",
|
||||
"name": "limit",
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "package type filter",
|
||||
"in": "query",
|
||||
"name": "type",
|
||||
"schema": {
|
||||
"enum": [
|
||||
"alpine",
|
||||
"cargo",
|
||||
"chef",
|
||||
"composer",
|
||||
"conan",
|
||||
"conda",
|
||||
"container",
|
||||
"cran",
|
||||
"debian",
|
||||
"generic",
|
||||
"go",
|
||||
"helm",
|
||||
"maven",
|
||||
"npm",
|
||||
"nuget",
|
||||
"pub",
|
||||
"pypi",
|
||||
"rpm",
|
||||
"rubygems",
|
||||
"swift",
|
||||
"terraform",
|
||||
"vagrant"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "name filter",
|
||||
"in": "query",
|
||||
"name": "q",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/components/responses/PackageList"
|
||||
},
|
||||
"403": {
|
||||
"$ref": "#/components/responses/forbidden"
|
||||
}
|
||||
},
|
||||
"summary": "List all packages",
|
||||
"tags": [
|
||||
"admin"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/admin/unadopted": {
|
||||
"get": {
|
||||
"operationId": "adminUnadoptedList",
|
||||
|
||||
Reference in New Issue
Block a user