Skip to content

feat: add attachment download command#954

Open
admSla99 wants to merge 11 commits intoankitpokhrel:mainfrom
admSla99:feat/attachment-download
Open

feat: add attachment download command#954
admSla99 wants to merge 11 commits intoankitpokhrel:mainfrom
admSla99:feat/attachment-download

Conversation

@admSla99
Copy link
Copy Markdown

Summary

Add `jira issue attachment download` command to download all attachments from a Jira issue.

Features

  • Downloads all attachments from specified issue
  • Default output directory: `.//`
  • Custom output directory via `--output-dir` / `-o` flag
  • Works with both Jira Cloud (v3 API) and Jira Server (v2 API)
  • Human-readable file size display

Usage

  # Download all attachments to ./ISSUE-123/
  jira issue attachment download ISSUE-123

  # Download to custom directory
  jira issue attachment download ISSUE-123 -o ./downloads

  # Using alias
  jira issue att download ISSUE-123

Changes

  • `pkg/jira/types.go` - Add `Attachment` type
  • `pkg/jira/attachment.go` - Add `GetIssueAttachments` and `DownloadAttachment` methods
  • `api/client.go` - Add `ProxyGetIssueAttachments` proxy function
  • `internal/cmd/issue/attachment/` - Add attachment command with download subcommand
  • Unit tests included

@admSla99 admSla99 force-pushed the feat/attachment-download branch from b6110d9 to d7af389 Compare February 20, 2026 11:26
Fixes magic number lint warning by defining dirPerm constant.
@admSla99
Copy link
Copy Markdown
Author

Hello @ankitpokhrel can you or somebody else please review this ? This feature is realy needed for us in our company. Thank you

@saggl
Copy link
Copy Markdown

saggl commented Mar 10, 2026

@admSla99 wauh really helpfull i also want this subcommand. @ankitpokhrel how long do you think need i wait?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants