Skip to content

Instantly share code, notes, and snippets.

@erikwennerberg
Created April 1, 2014 23:30
Show Gist options
  • Save erikwennerberg/9925162 to your computer and use it in GitHub Desktop.
Save erikwennerberg/9925162 to your computer and use it in GitHub Desktop.
Jira Widget for Dashing, that pulls all issues in a project
require 'jira'
username = "login"
password = "password"
projectkey = "PRO"
options = {
:username => username,
:password => password,
:site => 'url',
:context_path => '/jira',
:auth_type => :basic
}
SCHEDULER.every '10s', :first_in => 0 do |job|
client = JIRA::Client.new(options)
# Show all projects
project = client.Project.find(projectkey)
issues = Array.new
project.issues.each do |issue|
#puts issue.key
if issues.size < 8
issues.push({label: issue.key, value: issue.summary})
end
end
send_event('jira_issues', {items: issues})
#issue.comments.each {|comment| ... }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment