Created
April 1, 2014 23:30
-
-
Save erikwennerberg/9925162 to your computer and use it in GitHub Desktop.
Jira Widget for Dashing, that pulls all issues in a project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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