Skip to content

Commit d3d204a

Browse files
committed
github.py: add method to filter by PRs
1 parent d747146 commit d3d204a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

github.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ def repo(self, org, repo):
2323
return GitHubIssues(self.issues(lambda item: item['repository_url'].endswith(f'/repos/{org}/{repo}')),
2424
max_results=self._max_results, token=self._token)
2525

26+
def prs(self):
27+
return GitHubIssues(self.issues(lambda item: item['pull_request'] is True),
28+
max_results=self._max_results, token=self._token)
29+
2630
def issues(self, predicate=lambda x: True):
2731
return list(filter(predicate, self._json['items']))
2832

0 commit comments

Comments
 (0)