feat(issue): add attachment subcommand for issue attachments #54
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/issue-attachment-FJCLI-43"
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 issuecould create and comment on issues but had no way to manage their attachments, so an agent or user filing an issue withfjcould not attach evidence (a screenshot, a log file): the file had to be added by hand in the web UI. Mirroryt issue attachmentwith a newfj issue attachmentgroup ofadd/list/get/remove, backed by Forgejo's Gitea-compatible issue-asset endpoints.add <index> <file> [--name]uploads a local file viaissue_create_issue_attachment(defaulting the asset name to the file name);list <index>lists each attachment's id, name, size, and download URL;get <index> <name|id> [--out]resolves the asset (name first, then numeric id) and downloads its bytes to a path or directory;remove <index> <asset_id>deletes by id. Every command honors the existing host selection (--host/--remote/ remote inference) and the--format text|json/--jsonconventions; the server enforces the attachment size limit, so an oversized upload surfaces its error like the other subcommands.forgejo-apiexposes issue attachments only as metadata (no byte-download method, and theForgejoclient's inner reqwest client is private), so the byte download lives infj-client(download_attachment) next toaction_run_logs, reusing the host bearer token and following redirects with theAuthorizationheader marked sensitive. The CLI-agnostic operations live infj-core::issues; rendering, the clap tree, and the new Fluent messages stay in the binary, keeping thefj-client/fj-coreMCP-reuse contract (no clap/crossterm/fluent) intact.#FJCLI-43
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
attachmentsubcommand for issue attachments