feat(attachment): download attachments under their own name

issue attachment download (and pr attachment download) required
--output-file. It now writes ./<name> like gh release download, refusing
to replace an existing file unless --clobber (or --skip-existing to keep
it), with -O/--output and -D/--dir from the shared download flags.
attachment list shows ID NAME SIZE DOWNLOADS CREATED with readable
sizes, attachment view is a view, and upload, rename and delete report
✓ lines; delete names the attachment in its confirmation. The commands
accept issue and pull request URLs and have help text with examples.

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-12 00:17:05 +02:00
1 parent 0f090654a4
commit e5796af9e9
5 files changed
+192 -126

No files matched your search

-14
View File
@@ -418,23 +418,9 @@ const (
shortsToFix = `
`
examplesToWrite = `
issue attachment delete
issue attachment download
issue attachment edit
issue attachment list
issue attachment upload
issue attachment view
pr attachment delete
pr attachment download
pr attachment edit
pr attachment list
pr attachment upload
pr attachment view
search issue
search pr
`
longsToWrite = `
issue attachment
pr attachment
`
)