Skip to content

fix: convert ADF description to text for markdown/detail output#22

Merged
pchuri merged 2 commits intomainfrom
fix/adf-description-object-object
Apr 11, 2026
Merged

fix: convert ADF description to text for markdown/detail output#22
pchuri merged 2 commits intomainfrom
fix/adf-description-object-object

Conversation

@pchuri
Copy link
Copy Markdown
Owner

@pchuri pchuri commented Apr 11, 2026

📋 Summary

Fix --format markdown and default detail view outputting [object Object] instead of actual description content when using JIRA API v3.

🎯 Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)

🔍 Changes Made

  • Add convertAdfToText() function to recursively convert ADF (Atlassian Document Format) JSON to readable text/markdown
  • Add resolveDescription() wrapper that handles both string (API v2) and ADF object (API v3) descriptions
  • Apply conversion in formatIssueAsMarkdown() and displayIssueDetails()
  • Supports paragraph, heading, bulletList, orderedList, codeBlock, blockquote, mention, hardBreak, rule, table, media node types

🧪 Testing

  • All existing tests pass
  • New tests added for new functionality (16 new test cases)
  • Code coverage maintained/improved

📊 Test Results

Test Suites: 7 passed, 7 total
Tests:       116 passed, 116 total

🚀 Deployment Notes

  • No special deployment steps required

📝 Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

🔗 Related Issues

pchuri added 2 commits April 11, 2026 22:20
JIRA API v3 returns description as ADF (Atlassian Document Format)
JSON object instead of plain string. This caused [object Object]
to be displayed when viewing issues with --format markdown or
default detail view.

Closes #21
Address GHSA-3p68-rc4w-qgx5 (SSRF via NO_PROXY bypass) and
GHSA-fvcv-3m26-pcqx (cloud metadata exfiltration via header injection).
@pchuri pchuri merged commit 25ecf91 into main Apr 11, 2026
5 checks passed
github-actions bot pushed a commit that referenced this pull request Apr 11, 2026
## [2.3.3](v2.3.2...v2.3.3) (2026-04-11)

### Bug Fixes

* convert ADF description to text for markdown/detail output ([#22](#22)) ([25ecf91](25ecf91)), closes [#21](#21)
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 2.3.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] --format markdown outputs description as [object Object]

1 participant