feat(project): create and delete a project #144
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/YT-88-project-create-delete"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
yt projectcould read projects but not stand one up, so a scripted setup still had one admin-UI step in the middle of it. Addproject create --key <SHORT> --name <NAME> [--description] [--leader <login>] [--template <kanban|scrum>], which posts/api/admin/projectsand prints the new project through the same tableproject listrenders, andproject delete <SHORT> --yesalongside 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
--leaderlogin when given, otherwise from the account the token belongs to. A--keyalready in use is refused before anything is posted rather than left to the server's error, and--templateis validated by clap.Resolution is split from the write (
api::plan_create_projectreturns aCreateProjectPlanthatapi::create_projectexecutes), matching thefields addsplit, so--dry-runprints the byte-exact body the live path would post with the leader login in a separateresolvedblock.deleteprompts unless--yesis given, matchingyt 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