diff --git a/lib/github.rb b/lib/github.rb index 52d9329..6eb95cf 100644 --- a/lib/github.rb +++ b/lib/github.rb @@ -29,7 +29,7 @@ def self.open_pull_requests_for_repo(repo, extra_filters="") def self._map_pr_data_search(data) return data["data"]["search"]["edges"].map do |edge| - _pr_data(edge["node"]) + _pr_data(edge["node"]) unless edge.nil? end end diff --git a/team_unified_prs.rb b/team_unified_prs.rb index 6d76f67..6ca16a0 100755 --- a/team_unified_prs.rb +++ b/team_unified_prs.rb @@ -51,7 +51,7 @@ def positional_arg_or_env_split(idx, env_var) next if skip_team_members.include?(member["login"]) add_prs.call( Github.open_pull_requests_for_involves(member["login"]).reject do |pr| - pr["owner"].downcase != parsed_team["org"].downcase + pr.nil? || pr["owner"].downcase != parsed_team["org"].downcase end ) end