Skip to content

Commit 452d6de

Browse files
Fixed detection of closed Issues and PRs
1 parent 4ae4817 commit 452d6de

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

app/Services/GitHub.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ protected function pullRequest(NotificationData $notification): array
132132

133133
protected function shouldSkip(NotificationData $notification, ItemData $item): bool
134134
{
135-
if ($this->repositories && Str::startsWith($notification->fullName, $this->repositories)) {
135+
if ($this->repositories && ! Str::startsWith($notification->fullName, $this->repositories)) {
136136
return true;
137137
}
138138

@@ -145,9 +145,13 @@ protected function shouldSkip(NotificationData $notification, ItemData $item): b
145145
}
146146

147147
if ($this->withOpen && $item->isOpen) {
148-
return true;
148+
return false;
149+
}
150+
151+
if ($notification->type === 'PullRequest' && $item->isMerged) {
152+
return false;
149153
}
150154

151-
return $item->isOpen || ! $item->isMerged;
155+
return $item->isOpen;
152156
}
153157
}

0 commit comments

Comments
 (0)