FJ-32: Add fj repo deploy-key subcommands (list/view/create/delete) #39
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/repo-deploy-key-subcommands-FJ-32"
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?
FJ-32: Add fj repo deploy-key subcommands (list/view/create/delete)
Adds
fj repo deploy-key list|view|create|deleteto manage a repository's deploy keys, with the API/domain layer infj-corefor reuse by the planned Forgejo MCP.Changes
fj-core(crates/fj-core/src/repo.rs): thinforgejo-apiwrapperslist_deploy_keys,get_deploy_key,create_deploy_key,delete_deploy_key, returningforgejo-apistructs viaeyre::Result. No clap/crossterm/fluent deps (MCP-reuse contract verified empty).fjbinary (crates/fj/src/repo.rs): newDeployKeySubcommandenum wired asRepoCommand::DeployKeyunder thedeploy-keyliteral (explicit naming to avoid ambiguity with user SSH keys and GPG keys). Keys addressed by numeric id;list/viewsupport the global--jsonflag via a stableDeployKeyJsonprojection (id, title, fingerprint, read_only, created_at).createtakes--title, optional--read-only, and the public key material from a positional file path or-for stdin, mapping toCreateKeyOption { title, key, read_only }.crates/fj/localization/en-US/messages.ftl.Acceptance criteria
cargo tree -p fj-client -p fj-core -e normal | grep -E 'clap|crossterm|fluent'stays emptyfj repo deploy-key listprints id, title, fingerprint, read-only state;--jsonemits projection structsfj repo deploy-key view <id>shows one key;--jsonsupportedfj repo deploy-key create --title <t> [--read-only] <keyfile|->creates the key from a file or stdinfj repo deploy-key delete <id>removes the keyVerification
cargo fmt --check,cargo clippy -p forgejo-cli -p fj-core --all-targets -- -D warnings,cargo build, andcargo testall pass locally.Closes FJ-32.