Skip to content

Instantly share code, notes, and snippets.

Created August 13, 2015 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/36aa492808f084bb6c10 to your computer and use it in GitHub Desktop.
Save anonymous/36aa492808f084bb6c10 to your computer and use it in GitHub Desktop.
require 'jira'
require 'logger'
host = "host"
username = "username"
password = "password"
status = "In Progress"
severitylevel = "Sev 2"
logger = Logger.new(STDOUT)
options = {
:username => username,
:password => password,
:context_path => '',
:site => host,
:auth_type => :basic
}
SCHEDULER.every '5m', :first_in => 0 do |job|
client = JIRA::Client.new(options)
num = 0;
jql_query = "STATUS = \"#{status}\" AND SEVERITY LEVEL = \"#{severitylevel}"\
#puts jql_query
logger.info(jql_query)
issues = client.Issue.jql(jql_query, [comments, summary])
logger.info(issues)
#client.Issue.jql(jql_query).each do |issue|
#num+=1
#end
send_event('jira', { current: num})
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment