codesoap / jirae

jirae allows you to edit texts in Jira with your local editor instead of Atlassian's WYSIWYG editor
MIT License
3 stars 0 forks source link
editor jira jira-rest-api productivity

jirae is a small tool, that allows you to edit Jira comments and issue descriptions with your favorite editor. It has been created, because Atlassian started to force its users to use their hideous WYSIWYG editor. It is a workaround for JRACLOUD-72631.

Note, that you must use the "old syntax" of Jira, not Markdown. E.g. preformatted text is written as {{text}}, headings are written as h3. Heading, etc. The full documentation of this markup language can be found here.

Installation

You can find precompiled binaries at the releases page. If you prefer to install from source, execute this:

go install github.com/codesoap/jirae@latest

Usage

Here is an example, assuming you prefer vim as your editor:

# A few environment variables need to be set; put them in your
# ~/.bashrc, a small wrapper script (e.g. if you want to use a
# password manager for the token) or similar for ease of use.
export EDITOR=vim
export JIRA_USER=your.username@somecorp.com
# Generate a token at https://id.atlassian.com/manage-profile/security/api-tokens
export JIRA_TOKEN=<your-REST-API-token>

# Edit a comment (copy this URL by clicking the chain-symbol on the comment):
jirae 'https://somecorp.atlassian.net/browse/SCO-1234?focusedCommentId=4321'

# Edit an issue description (copy this URL by clicking the chain-symbol on the issue):
jirae 'https://somecorp.atlassian.net/browse/SCO-1234'

# Create a new comment (copy this URL by clicking the chain-symbol on the issue):
jirae -c 'https://somecorp.atlassian.net/browse/SCO-1234'

Tips and Tricks

On most operating systems you can use the xclip tool to automatically read a copied URL from the clipboard. This way you don't have to paste the URL. Add this alias to your ~/.bashrc (or similar): jir() {jirae "$@" "$(xclip -o -selection clipboard)"}. Now you can simply call jir (without any argument) or jir -c after you have copied a URL from Jira.