-
Get all Issues Time
-
Get all Issues Budget Get all issues Time and Budget (meta report that merges output from two previous reports)
-
Get a Issue Time
-
Get a Issue Budget Get a Issue Time and Budget (meta report that merges output from two previous reports)
-
Get all Issues Time for a Milestone
-
Get all Issues Budget for a Milestone
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
| def addMissingMonths (datesHash) | |
| count = 0 | |
| datesHash.keys.each do |x| | |
| result = [] | |
| if x != datesHash.keys.last | |
| (x+1.month).upto(datesHash.keys[count+1]-1.month) do |a| | |
| # result << [a.month,a.year] | |
| result << [a.at_beginning_of_month] | |
| end |
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 'json' | |
| class GenerateGDataTable | |
| def initialize | |
| @columnArray = [] | |
| @rowArray = [] | |
| end | |
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 'octokit' | |
| commits = Octokit.commits("StephenOTT/Test1") | |
| commitComments = Octokit.commit_comments("StephenOTT/Test1", "b08156d2327b47c5bfb2543b224cd6aee726add5") | |
| commits.each do |x| | |
| puts x.attrs[:commit].attrs[:author].attrs[:date] | |
| end |
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
| def get_comment_tasks (commentBody, taskStatus = :incomplete) | |
| tasks = [] | |
| startStringOpen = /\-\s\[\s\]\s/ | |
| startStringClosed = /\-\s\[x\]\s/ | |
| endString = /[\r\n]|\z/ | |
| if taskStatus == :incomplete | |
| tasksInBody = commentBody.scan(/#{startStringOpen}(.*?)#{endString}/) |
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 'octokit' | |
| require 'pp' | |
| class GHSearchTest | |
| def gh_authenticate(username, password) | |
| @ghClient = Octokit::Client.new( | |
| :login => username.to_s, | |
| :password => password.to_s, |
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
| a = [] | |
| output.each do |x| | |
| a << x["converted_date"] | |
| end | |
| b = (output.first["converted_date"]..output.last["converted_date"]).to_a | |
| zeroValueDates = (b.map{ |date| date.strftime("%b %Y") } - a.map{ |date| date.strftime("%b %Y") }).uniq | |
| zeroValueDates.each do |zvd| | |
| zvd = DateTime.parse(zvd) | |
| output << {"repo"=> repo , "state"=>"closed", "closed_year"=>zvd.strftime("%Y").to_i, "closed_month"=>zvd.strftime("%m").to_i, "count"=>0, "converted_date"=>zvd} |
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 'chronic' | |
| require 'time_difference' | |
| humanStatement1 = "this tuesday 1pm" | |
| humanStatement2 = "this tuesday 3pm" | |
| humanStatement1Parsed = Chronic.parse(humanStatement1) | |
| humanStatement2Parsed = Chronic.parse(humanStatement2) |
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 "redis" | |
| redis = Redis.new | |
| puts redis.zscan("ql:q:testing-scheduled", 5, {match: "7f81bbe64bcd4599b565c95c817cf363"}) |
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
| Here is a way to deal with this issue: | |
| def convertIssueDatesInMongo (issues) | |
| issues.each do |y| | |
| y["created_at"] = DateTime.strptime(y["created_at"], '%Y-%m-%dT%H:%M:%S%z').to_time.utc | |
| y["updated_at"] = DateTime.strptime(y["updated_at"], '%Y-%m-%dT%H:%M:%S%z').to_time.utc | |
| end | |
| return issues | |
| end |