awesome-wm-widgets/jira-widget
streetturtle 043c2b9466 [jira] move error marker to the top right corner 2021-01-03 20:11:19 -05:00
..
README.md Update readmes to include timeout arg 2020-09-19 01:22:27 -07:00
jira-mark-gradient-blue.svg Update readme 2019-11-05 21:54:24 -05:00
jira.lua [jira] move error marker to the top right corner 2021-01-03 20:11:19 -05:00
out.gif [jira] add gif and update readme 2020-02-23 21:07:44 -05:00

README.md

Jira widget

The widget shows the number of tickets assigned to the user and when clicked shows them in the list with some additional information. When item in the list is clicked - it opens the issue in browser.

git

How it works

Widget uses cURL to query Jira's REST API. In order to be authenticated, widget uses a netrc feature of the cURL, which is basically to store basic auth credentials in a .netrc file in home folder.

If you are on Atlassian Cloud, then instead of providing a password in netrc file you can set an API token which is a safer option, as you can revoke/change the token at any time.

Customization

It is possible to customize widget by providing a table with all or some of the following config parameters:

Name Default Description
host Required Ex: http://jira.tmnt.com
query jql=assignee=currentuser() AND resolution=Unresolved JQL query
icon ~/.config/awesome/awesome-wm-widgets/jira-widget/jira-mark-gradient-blue.svg Path to the icon
timeout 10 How often in seconds the widget refreshes

Installation

Create a .netrc file in you home directory with following content:

machine turtlejira.com
login mikey@tmnt.com
password cowabunga

Then change file's permissions to 600 (so only you can read/write it):

chmod 600 ~/.netrc

And test if it works by calling the API:

curl -s -n 'https://turtleninja.com/rest/api/2/search?jql=assignee=currentuser()+AND+resolution=Unresolved'

Clone/download repo and use widget in rc.lua:

local jira_widget = require("awesome-wm-widgets.jira-widget.jira")
...
s.mytasklist, -- Middle widget
	{ -- Right widgets
    	layout = wibox.layout.fixed.horizontal,
		...
		-- default
		jira_widget({host = 'http://jira.tmnt.com'}),
		...