Skip to content

Commit

Permalink
refs #1 implement filtering assignee by
Browse files Browse the repository at this point in the history
  • Loading branch information
t2y committed Sep 2, 2023
1 parent 0318920 commit 14c704c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion github_api/cli/common_option.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def get_common_parser():

parser.add_argument(
'--user', action='store',
help='set user to filter assignee of pull request'
help='set user to filter assignee of pull request/issue'
)

parser.add_argument(
Expand Down
6 changes: 4 additions & 2 deletions github_api/core/repository_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ def set_labels(self, issue):

def get_issues(self):
since = NotSet if self.args.datefrom is None else self.args.datefrom
for issue in self.repo.get_issues(state=GithubState.ALL.value,
since=since):
assignee = NotSet if self.args.user is None else self.args.user
for issue in self.repo.get_issues(assignee=assignee,
since=since,
state=GithubState.ALL.value):
log.info(f'#{issue.number}: {issue.title} '
f'comments ({issue.comments})')
self.set_issue_comments(issue)
Expand Down

0 comments on commit 14c704c

Please sign in to comment.