MrRefactoring / jira.js

A JavaScript/TypeScript wrapper for the JIRA Cloud, Service Desk and Agile REST API
https://mrrefactoring.github.io/jira.js/
MIT License
349 stars 46 forks source link

addComment V3 support simple string body #260

Closed Cellule closed 1 year ago

Cellule commented 1 year ago

I was implementing adding a comment to an issue with api V3 and stumbled on this todo https://github.com/MrRefactoring/jira.js/blob/5d9a19bafd6d53744498da2780f3fb0ed7aca668/src/version3/issueComments.ts#L147-L150

Since I basically implemented the same thing in my project, I figured I'd take a stab at it directly here.

I had to tweak .prettierrc to match closer the .editorconfig file because the linter was complaining a lot about some choices Prettier made. I still had an indentation issue with a ternary, but worked around the problem by making a function instead