Skip to content

fix(comment): move markdown conversion to command layer, add --raw flag#14

Merged
hackerh3 merged 1 commit into
mainfrom
hhaecker/fix-comment-markup
May 13, 2026
Merged

fix(comment): move markdown conversion to command layer, add --raw flag#14
hackerh3 merged 1 commit into
mainfrom
hhaecker/fix-comment-markup

Conversation

@hackerh3
Copy link
Copy Markdown
Owner

Summary

  • Moves md.ToJiraMD() conversion from the Jira client layer (pkg/jira/issue.go) up to the command layer (add/edit commands), fixing the bug where comments created via API were double-converted
  • Adds --raw flag to jira issue comment add and jira issue comment edit to skip markdown-to-Jira conversion entirely (useful for pre-formatted or programmatic input)
  • Adds omitempty to the Properties field in CommentBody so empty properties are not sent to the API
  • Only sets properties when internal=true, preventing spurious empty objects in API requests

Testing

  • Added unit tests for both add and edit commands verifying --raw flag behavior
  • Existing pkg/jira/issue_test.go updated to reflect moved conversion logic

Closes #13

- Move md.ToJiraMD() from client to add/edit commands
- Add --raw flag to skip markdown conversion
- Add omitempty to comment Properties field
- Only set properties when internal=true

Closes #13
@hackerh3 hackerh3 force-pushed the hhaecker/fix-comment-markup branch from 43374ef to 8b798f6 Compare May 13, 2026 15:34
@hackerh3 hackerh3 merged commit e34a03e into main May 13, 2026
1 check passed
@hackerh3 hackerh3 deleted the hhaecker/fix-comment-markup branch May 13, 2026 15:36
github-actions Bot pushed a commit that referenced this pull request May 13, 2026
## [1.11.0](1.10.0...1.11.0) (2026-05-13)

### Features

* **cmd:** warn on duplicate subtask type during issue creation ([#12](#12)) ([79a0dc2](79a0dc2))

### Bug Fixes

* **comment:** move markdown conversion to command layer, add --raw flag ([#14](#14)) ([e34a03e](e34a03e)), closes [#13](#13)
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.11.0 🎉

The release is available on GitHub release

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.

comment add/edit silently converts *bold* to _italic_ and edit -b is a no-op

1 participant