Skip to content

Commit

Permalink
Fix multiple repo: filter on request (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
babeuloula authored Oct 8, 2019
1 parent 10defaf commit 568793d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Service/Github/PullRequestFilterService.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ protected function getAll(string $username, string $repository, string $filter,
{
/** @var Search $searchApi */
$searchApi = $this->client->api('search');
$filter .= " repo:$username/$repository";

if (0 === \preg_match("/repo\:[a-zA-Z0-9\/-]+/", $filter)) {
$filter .= " repo:$username/$repository";
}

// Issues and PRs use the same method
$pullRequests = $searchApi->issues($filter)['items'];
Expand Down

0 comments on commit 568793d

Please sign in to comment.