Add api subcommand for arbitrary api calls not covered by existing subcommands (#879)

Reviewed-on: https://gitea.com/gitea/tea/pulls/879
Co-authored-by: techknowlogick <techknowlogick@gitea.com>
Co-committed-by: techknowlogick <techknowlogick@gitea.com>
This commit is contained in:
techknowlogick
2026-02-03 20:24:21 +00:00
committed by techknowlogick
parent 6414a5e00e
commit 82d8a14c73
9 changed files with 540 additions and 133 deletions

View File

@@ -1712,3 +1712,25 @@ List Users
**--remote, -R**="": Discover Gitea login from remote. Optional
**--repo, -r**="": Override local repository path or gitea repository slug to interact with. Optional
## api
Make an authenticated API request
**--Field, -F**="": Add a typed field to the request body (key=value, @file, or @- for stdin)
**--field, -f**="": Add a string field to the request body (key=value)
**--header, -H**="": Add a custom header (key:value)
**--include, -i**: Include HTTP status and response headers in output (written to stderr)
**--login, -l**="": Use a different Gitea Login. Optional
**--method, -X**="": HTTP method (GET, POST, PUT, PATCH, DELETE) (default: "GET")
**--output, -o**="": Write response body to file instead of stdout (use '-' for stdout)
**--remote, -R**="": Discover Gitea login from remote. Optional
**--repo, -r**="": Override local repository path or gitea repository slug to interact with. Optional