feat(project): create and delete a project #144

Merged
Claude-Run merged 1 commit from feat/YT-88-project-create-delete into main 2026-08-05 03:35:35 +02:00
Member

yt project could read projects but not stand one up, so a scripted setup still had one admin-UI step in the middle of it. Add project create --key <SHORT> --name <NAME> [--description] [--leader <login>] [--template <kanban|scrum>], which posts /api/admin/projects and prints the new project through the same table project list renders, and project delete <SHORT> --yes alongside it so a mistyped key during setup is recoverable without the UI.

The leader is mandatory in YouTrack's create body, so it is always resolved: from the --leader login when given, otherwise from the account the token belongs to. A --key already in use is refused before anything is posted rather than left to the server's error, and --template is validated by clap.

Resolution is split from the write (api::plan_create_project returns a CreateProjectPlan that api::create_project executes), matching the fields add split, so --dry-run prints the byte-exact body the live path would post with the leader login in a separate resolved block. delete prompts unless --yes is given, matching yt issue delete, and re-reads the project list afterwards so a request the server accepted and then ignored is reported instead of confirmed. A 403 names the permission the account is missing.

#YT-88

`yt project` could read projects but not stand one up, so a scripted setup still had one admin-UI step in the middle of it. Add `project create --key <SHORT> --name <NAME> [--description] [--leader <login>] [--template <kanban|scrum>]`, which posts `/api/admin/projects` and prints the new project through the same table `project list` renders, and `project delete <SHORT> --yes` alongside it so a mistyped key during setup is recoverable without the UI. The leader is mandatory in YouTrack's create body, so it is always resolved: from the `--leader` login when given, otherwise from the account the token belongs to. A `--key` already in use is refused before anything is posted rather than left to the server's error, and `--template` is validated by clap. Resolution is split from the write (`api::plan_create_project` returns a `CreateProjectPlan` that `api::create_project` executes), matching the `fields add` split, so `--dry-run` prints the byte-exact body the live path would post with the leader login in a separate `resolved` block. `delete` prompts unless `--yes` is given, matching `yt issue delete`, and re-reads the project list afterwards so a request the server accepted and then ignored is reported instead of confirmed. A 403 names the permission the account is missing. #YT-88
feat(project): create and delete a project
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 27s
Create release / Create release from merged PR (pull_request) Has been skipped
14a7862ab2
`yt project` could read projects but not stand one up, so a scripted setup still had one admin-UI step in the middle of it. Add `project create --key <SHORT> --name <NAME> [--description] [--leader <login>] [--template <kanban|scrum>]`, which posts `/api/admin/projects` and prints the new project through the same table `project list` renders, and `project delete <SHORT> --yes` alongside it so a mistyped key during setup is recoverable without the UI.

The leader is mandatory in YouTrack's create body, so it is always resolved: from the `--leader` login when given, otherwise from the account the token belongs to. A `--key` already in use is refused before anything is posted rather than left to the server's error, and `--template` is validated by clap.

Resolution is split from the write (`api::plan_create_project` returns a `CreateProjectPlan` that `api::create_project` executes), matching the `fields add` split, so `--dry-run` prints the byte-exact body the live path would post with the leader login in a separate `resolved` block. `delete` prompts unless `--yes` is given, matching `yt issue delete`, and re-reads the project list afterwards so a request the server accepted and then ignored is reported instead of confirmed. A 403 names the permission the account is missing.

#YT-88
Claude-Run deleted branch feat/YT-88-project-create-delete 2026-08-05 03:35:36 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pandoras-box/youtrack-cli!144
No description provided.