Skip to content

Commit

Permalink
threaded request for team repo issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmullins committed Sep 14, 2016
1 parent ae01f23 commit 6a818ca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions lib/lita/github_pr_list/pull_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,18 @@ def list
private
def get_pull_requests
# Grab the issues and sort out the pull request issues by repos name
puts "Gathering PRs..."
threads = []
github_client.team_repositories(team_id).each do |repo|
github_client.list_issues(repo.id).each do |issue|
if issue.pull_request
issue.repository = repo
github_pull_requests << issue
threads << Thread.new do
github_client.list_issues(repo.id).each do |issue|
if issue.pull_request
issue.repository = repo
github_pull_requests << issue
end
end
end
end
threads.map(&:join)
end

def build_summary
Expand Down
2 changes: 1 addition & 1 deletion lib/lita/github_pr_list/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Lita
module GithubPrList
VERSION = "0.2.2"
VERSION = "0.3.1"
end
end

0 comments on commit 6a818ca

Please sign in to comment.