YT-22: Add write path and full read for project VCS integrations #68

Merged
David merged 2 commits from feat/project-vcs-crud-YT-22 into main 2026-06-07 00:03:31 +02:00
Owner

YT-22: Add write path and full read for project VCS integrations

Restructures yt project vcs from a flat read-only args struct into a subcommand group so the CLI covers the whole Version Control project-settings screen: full-fidelity read plus create / update / delete for Gitea/Forgejo processors.

Surface

  • yt project vcs list <SHORT_NAME> adds an ID column; --enabled-only and --json still work.
  • yt project vcs show <SHORT_NAME> <ID> prints every settings field (id, type, enabled, server url/id, path, branch specification, committers) as key-value or --json.
  • yt project vcs add <SHORT_NAME> --server <URL> --path <owner/repo> [--branch-spec <spec>] [--disabled] creates a Gitea/Forgejo processor against an already-configured VCS server; an unknown --server URL fails with a clear, non-leaking error.
  • yt project vcs update <SHORT_NAME> <ID> [--enabled true|false] [--path ...] [--branch-spec ...] and yt project vcs delete <SHORT_NAME> <ID> select by server-side entity id; an unknown id returns a clear not-found error.
  • --dry-run on add/update/delete prints the endpoint and payload without sending any request.

Client layer

Widens the processor read selector to id,$type,enabled,path,branchSpecification,committers,server(id,url) and surfaces those on VcsProcessor. Adds get_project_vcs_processor, resolve_vcs_server_id, create_project_vcs_processor, update_project_vcs_processor, delete_project_vcs_processor. The Project VCS surface and the mutation endpoints are undocumented; the assumed endpoint shapes are recorded in code comments next to each function (matching how the existing read selector is documented) and are to be revised if a server rejects them. add supports Gitea/Forgejo only; other processor types and creating global VCS server entries are out of scope.

Tests

wiremock unit tests per new client function (success, error-body passthrough, not-found), plus CLI subcommand-parse and dry-run-envelope tests. cargo fmt --check, cargo clippy --all-targets -- -D warnings, and cargo test --all-targets all pass.

Docs and breaking change

README gains a Project VCS section and CLAUDE.md the status paragraph, both calling out the breaking change: yt project vcs <SHORT_NAME> is now yt project vcs list <SHORT_NAME>. Cargo.lock picks up the yt-cli 0.4.0 version the manifest already carried (the lock was stale from the Release v0.4.0 commit).

Closes YT-22.

🤖 Generated with Claude Code

## YT-22: Add write path and full read for project VCS integrations Restructures `yt project vcs` from a flat read-only args struct into a subcommand group so the CLI covers the whole Version Control project-settings screen: full-fidelity read plus create / update / delete for Gitea/Forgejo processors. ### Surface - `yt project vcs list <SHORT_NAME>` adds an `ID` column; `--enabled-only` and `--json` still work. - `yt project vcs show <SHORT_NAME> <ID>` prints every settings field (id, type, enabled, server url/id, path, branch specification, committers) as key-value or `--json`. - `yt project vcs add <SHORT_NAME> --server <URL> --path <owner/repo> [--branch-spec <spec>] [--disabled]` creates a Gitea/Forgejo processor against an already-configured VCS server; an unknown `--server` URL fails with a clear, non-leaking error. - `yt project vcs update <SHORT_NAME> <ID> [--enabled true|false] [--path ...] [--branch-spec ...]` and `yt project vcs delete <SHORT_NAME> <ID>` select by server-side entity id; an unknown id returns a clear not-found error. - `--dry-run` on add/update/delete prints the endpoint and payload without sending any request. ### Client layer Widens the processor read selector to `id,$type,enabled,path,branchSpecification,committers,server(id,url)` and surfaces those on `VcsProcessor`. Adds `get_project_vcs_processor`, `resolve_vcs_server_id`, `create_project_vcs_processor`, `update_project_vcs_processor`, `delete_project_vcs_processor`. The Project VCS surface and the mutation endpoints are undocumented; the assumed endpoint shapes are recorded in code comments next to each function (matching how the existing read selector is documented) and are to be revised if a server rejects them. `add` supports Gitea/Forgejo only; other processor types and creating global VCS server entries are out of scope. ### Tests wiremock unit tests per new client function (success, error-body passthrough, not-found), plus CLI subcommand-parse and dry-run-envelope tests. `cargo fmt --check`, `cargo clippy --all-targets -- -D warnings`, and `cargo test --all-targets` all pass. ### Docs and breaking change README gains a Project VCS section and CLAUDE.md the status paragraph, both calling out the breaking change: `yt project vcs <SHORT_NAME>` is now `yt project vcs list <SHORT_NAME>`. Cargo.lock picks up the yt-cli `0.4.0` version the manifest already carried (the lock was stale from the Release v0.4.0 commit). Closes YT-22. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(project): add full read and CRUD for project VCS integrations
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 18s
202a0746cd
Restructure `project vcs` from a flat read-only args struct into a subcommand group (`list`/`show`/`add`/`update`/`delete`) so the CLI covers the whole Version Control project-settings screen.

Client layer (youtrack-client): widen the processor read selector to `id,$type,enabled,path,branchSpecification,committers,server(id,url)` and surface those on `VcsProcessor`; add `get_project_vcs_processor`, `resolve_vcs_server_id`, `create_project_vcs_processor`, `update_project_vcs_processor`, and `delete_project_vcs_processor`. Mutations select a processor by server-side entity id and `add` references an already-configured VCS server by URL (failing clearly when the URL is unknown). The Project VCS surface and the mutation endpoints are undocumented; the assumed endpoint shapes are recorded in code comments next to each function, matching how the read selector is documented, and revised if a server rejects them. `add` supports Gitea/Forgejo only; other processor types are follow-ups.

CLI layer (yt-cli): five subcommands, each honoring `--json`; `add`/`update`/`delete` honor the global `--dry-run` by printing the intended endpoint and payload without sending any request. Mutations print a one-line confirmation on success and pass the API error body through on failure.

Tests: wiremock unit tests per new client function (success + error-body passthrough + not-found), plus CLI subcommand-parse and dry-run-envelope tests.

Docs: README gains a Project VCS section and CLAUDE.md the status paragraph, both calling out the breaking change. Cargo.lock picks up the yt-cli 0.4.0 version that the manifest already carried.

Breaking change: `yt project vcs <SHORT_NAME>` is now `yt project vcs list <SHORT_NAME>`.

#YT-22
Merge branch 'main' into feat/project-vcs-crud-YT-22
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
Check / fmt + clippy + build + tests (pull_request) Successful in 15s
17ef90d3af
David merged commit 5fb304adf0 into main 2026-06-07 00:03:31 +02:00
David deleted branch feat/project-vcs-crud-YT-22 2026-06-07 00:03:31 +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!68
No description provided.