Skip to content

Commit d74ec42

Browse files
Merge pull request #107 from TheDragonCode/1.x
Added service account IDs to mark as read
2 parents d632623 + 121642e commit d74ec42

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

app/Services/GitHub.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ protected function shouldSkip(NotificationData $notification, ItemData $item): b
187187
return true;
188188
}
189189

190-
if ($this->exceptMentions && $notification->reason === 'mention' && $this->isNotDependabot($item)) {
190+
if ($this->exceptMentions && $notification->reason === 'mention' && $this->isNotServiceAccount($item)) {
191191
return true;
192192
}
193193

@@ -223,8 +223,8 @@ protected function detected(int $count): void
223223
Output::info("unread $pluralized detected", $count);
224224
}
225225

226-
protected function isNotDependabot(ItemData $item): bool
226+
protected function isNotServiceAccount(ItemData $item): bool
227227
{
228-
return $item->ownerId !== config('bots.dependabot');
228+
return ! in_array($item->ownerId, config('bots.accounts'), true);
229229
}
230230
}

config/bots.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?php
22

33
return [
4-
'dependabot' => 49699333,
4+
'accounts' => [
5+
9919, // GitHub
6+
49699333, // dependabot
7+
41898282, // GitHub Actions
8+
],
59
];

0 commit comments

Comments
 (0)