module Jirabas
require 'pry'
Constants
- VERSION
Public Class Methods
client()
click to toggle source
# File lib/jirabas.rb, line 11 def self.client Config.init @client ||= JIRA::Client.new(Config.all) end
issues_i_did_recently()
click to toggle source
# File lib/jirabas.rb, line 19 def self.issues_i_did_recently client.Issue.jql("assignee = #{Config.username} AND resolution != Unresolved AND updatedDate > '-2d' ORDER BY updatedDate DESC") end
my_in_progress_issues()
click to toggle source
# File lib/jirabas.rb, line 16 def self.my_in_progress_issues client.Issue.jql("assignee = #{Config.username} AND resolution = Unresolved AND status = 'In Progress' ORDER BY updatedDate DESC") end
run(*args)
click to toggle source
# File lib/jirabas.rb, line 34 def self.run *args puts "I'm doing:\n" puts what_am_i_doing.join("\n").to_s puts "----------\nI did recently:\n" puts what_did_i_do_recently.join("\n").to_s puts "----------\nTo do:\n" puts to_do_assigned_to_me.join("\n").to_s end
to_do_assigned_to_me()
click to toggle source
# File lib/jirabas.rb, line 22 def self.to_do_assigned_to_me client.Issue.jql("assignee = #{Config.username} AND resolution = Unresolved AND status != 'In Progress' ORDER BY updatedDate DESC") .map { |e| "#{e.key}: #{e.summary}"} end
what_am_i_doing()
click to toggle source
# File lib/jirabas.rb, line 27 def self.what_am_i_doing my_in_progress_issues.map { |e| "#{e.key}: #{e.summary}"} end
what_did_i_do_recently()
click to toggle source
# File lib/jirabas.rb, line 30 def self.what_did_i_do_recently issues_i_did_recently.map { |e| "#{e.key}: #{e.summary}"} end