docs: document repo create owner routing
Some checks failed
labels / labels (pull_request) Successful in 20s
ci / test (pull_request) Has been cancelled

This commit is contained in:
codex-bot-andresmgsl 2026-08-21 06:37:04 +00:00
parent 914e4c444b
commit ccaeb8ee4e
2 changed files with 8 additions and 2 deletions

View file

@ -247,11 +247,12 @@ The stored token is handed to git ephemerally through environment-based config (
### `stoke repo create` ### `stoke repo create`
Create a new repository for the authenticated user. Create a new repository for the authenticated user or an organization.
```text ```text
Options: Options:
--name <name> repository name (required) --name <name> repository name (required)
-o, --owner <owner> repository owner (authenticated user or organization)
-d, --description <description> repository description -d, --description <description> repository description
--private make the repository private --private make the repository private
--public make the repository public --public make the repository public
@ -265,9 +266,13 @@ Example:
```bash ```bash
stoke repo create --name stoke-test --private \ stoke repo create --name stoke-test --private \
-d "Test repository created via stoke" -d "Test repository created via stoke"
stoke repo create -o heavy-duty --name shared-project --private
``` ```
Calls `POST /api/v1/user/repos`. When `--owner` is omitted or names the authenticated user (case-insensitively),
calls `POST /api/v1/user/repos`. For another owner, calls
`POST /api/v1/orgs/{owner}/repos`; Forgejo returns `403` when the caller cannot
create repositories for that organization.
### `stoke repo list` ### `stoke repo list`

1
changelog.d/24.md Normal file
View file

@ -0,0 +1 @@
- `repo create --owner` can now create organization-owned repositories while preserving the authenticated-user default. (#24).