Every now and then I do a pull request (PR) to contribute to open source projects like Appcelerator’s Alloy for Titanium. Like many other software developers, including myself, Appcelerator uses JIRA for managing the project and GitHub for managing the actual code.
Before doing a PR via GitHub it is highly appreciated if you create a JIRA ticket on forehand to describe the problem/improvement and track the process of testing and merging the code. But the PR itself of course should also contain some minimal information on what the code is doing and how.
Two flavors
Unfortunately, GitHub and JIRA use different kinds of text formatting notation. GitHub uses its own flavor of Markdown, while JIRA uses another set, shared between all of Atlassian’s products. This means I always have to re-format my texts between GitHub and JIRA situations like these.
Example
Take for example this Markdown text:
1 2 3 4 5 |
Some code inline like `var foo = 'bar';` and a block like: ```javascript alert('hello'); ``` |
Which would look a lot different in JIRA:
1 2 3 4 5 |
Some code inline like {{var foo = 'bar';}} and a block like: {code:javascript} alert('helllo'); {code} |
Solution
Someone said programming is a synonym for laziness. Well, that might be true. Because I got tired of this reformatting I started a little OS project called J2M. It’s a simple JIRA to Markdown and back again converter. For now it supports just what I needed at the moment, but feel free to fork the project.
Use the converter online at j2m.fokkezb.nl