mozilla / jira-bugzilla-integration

Jira Bugzilla Integration (JBI) - system to sync bugs and issues
Mozilla Public License 2.0
9 stars 21 forks source link

Fix #723: format comment with Jira syntax #836

Closed leplatrem closed 8 months ago

leplatrem commented 8 months ago

This is best effort, but should cover most cases.

A proper implementation would probably require using a pyparsing like https://pypi.org/project/jira2markdown/ does.

grahamalama commented 8 months ago

A proper implementation would probably require using a pyparsing

It might be heavyweight, but we could also pull in Pandoc for our conversion needs -- either by using subprocess or a Python wrapper

leplatrem commented 8 months ago

It might be heavyweight, but we could also pull in Pandoc for our conversion needs -- either by using subprocess or a Python wrapper

I don't see that it would transform to Jira formatting syntax.

Anyway, this regexp-based implementation may have limitations, but it is far better than posting raw markdown and was cheap to implement. It should cover most cases (see tests)