docs: document repo create owner routing
This commit is contained in:
parent
914e4c444b
commit
ccaeb8ee4e
2 changed files with 8 additions and 2 deletions
|
|
@ -247,11 +247,12 @@ The stored token is handed to git ephemerally through environment-based config (
|
|||
|
||||
### `stoke repo create`
|
||||
|
||||
Create a new repository for the authenticated user.
|
||||
Create a new repository for the authenticated user or an organization.
|
||||
|
||||
```text
|
||||
Options:
|
||||
--name <name> repository name (required)
|
||||
-o, --owner <owner> repository owner (authenticated user or organization)
|
||||
-d, --description <description> repository description
|
||||
--private make the repository private
|
||||
--public make the repository public
|
||||
|
|
@ -265,9 +266,13 @@ Example:
|
|||
```bash
|
||||
stoke repo create --name stoke-test --private \
|
||||
-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`
|
||||
|
||||
|
|
|
|||
1
changelog.d/24.md
Normal file
1
changelog.d/24.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
- `repo create --owner` can now create organization-owned repositories while preserving the authenticated-user default. (#24).
|
||||
Loading…
Reference in a new issue