Skip to content

Commit

Permalink
Exclude all bots from user lists.
Browse files Browse the repository at this point in the history
When listing committers and/or commenters, make sure to exclude, not
only 'github-actions[bot]', but *any* bot from the list, for the same
reasons we excluded 'github-actions[bot]' in the first place: it's not
informative for most purposes, and this causes issues when the list is
later used to expand the `user:*` selector.

closes #18
  • Loading branch information
gouttegd committed Aug 10, 2023
1 parent 4aec0d6 commit 699904f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions incenp/grainyhead/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def committers(self):
self._committers = [
l.login
for l in self._provider.committers
if l.login != 'github-actions[bot]'
if not l.login.endswith('[bot]')
]
return self._committers

Expand All @@ -84,13 +84,13 @@ def commenters(self):
commenters = [
i.user.login
for i in self.all_issues
if i.user.login != 'github-actions[bot]'
if not i.user.login.endswith('[bot]')
]
commenters.extend(
[
c.user.login
for c in self.comments
if c.user.login != 'github-actions[bot]'
if not c.user.login.endswith('[bot]')
]
)
self._commenters = list(set(commenters))
Expand Down

0 comments on commit 699904f

Please sign in to comment.