Skip to content

comment/attach: support attaching and embedding images in Jira comments #115

Closed

Description

@f3rdy

Problem

budjira comment add can post text, but there is no way to attach a file to
an issue or embed an image in a comment. When documenting a result on a Jira
issue — e.g. a before/after chart — budjira alone can't put the image on the
ticket. Today that means dropping to the raw Jira REST attachments endpoint and
then posting a plain-text comment that merely references the filename.

Workaround currently needed:

# 1) upload the file as an issue attachment (raw REST)
curl -X POST -H "X-Atlassian-Token: no-check" \
     -F "file=@chart.png" \
     https://<site>.atlassian.net/rest/api/3/issue/<ISSUE>/attachments

# 2) a normal budjira comment that just mentions the filename
budjira comment add <ISSUE> "... see attached chart.png"

Proposed

  • budjira attach <ISSUE> <file>... — upload one or more files as issue attachments.
  • budjira comment add <ISSUE> "text" --attach <file>... — upload the file(s) and
    reference them from the new comment.

Nice to have: true inline embedding (Jira Cloud)

Jira Cloud comments are ADF (API v3), so plain !file! wiki markup does not
render inline — the image only appears in the issue's Attachments panel. For the
image to show inside the comment body, the comment must be built as ADF with a
mediaSingle node referencing the uploaded attachment's media id. A --embed
flag could construct that so the chart renders in the comment, not just as an
attachment.

Acceptance

  • Attach an image to an issue from budjira alone (no manual curl/REST).
  • Reference it from a comment; optionally embed it inline on Jira Cloud.

Notes

  • Attachment upload: multipart POST /rest/api/3/issue/{key}/attachments with header
    X-Atlassian-Token: no-check.
  • Inline embedding needs an ADF media node (using the uploaded file id), not wiki markup.

Activity

  1. f3rdy commented on Aug 29, 2026

    @f3rdy
    ContributorAuthor

    Released in v1.26.0.

    • budjira attach ISSUE FILE... uploads one or more files as issue attachments (no manual curl/REST needed).
    • budjira comment add ISSUE "text" --attach FILE... uploads and references the files from the comment (images via !file! wiki markup, other files via [^file]).
    • --embed FILE... (nice-to-have, implemented): posts the comment as an ADF document with mediaSingle nodes via REST API v3, so images render inline in the comment body on Jira Cloud.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions