Skip to content

Commit c4a5118

Browse files
committed
fix: refactor te condition to check enable send status comment
1 parent 3d70d72 commit c4a5118

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/Services/WebhookService.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,8 @@ protected function isStatusCommentEnabled(array $payload): bool
8787
{
8888
$fieldType = $payload['changes']['field_value']['field_type'] ?? '';
8989

90-
if ((string) $fieldType === 'Status'
91-
&& !config('github-project.enable_status_comment')
92-
) {
93-
return false;
94-
}
95-
96-
return true;
90+
return !((string) $fieldType === 'Status'
91+
&& (bool) config('github-project.enable_status_comment') === false
92+
);
9793
}
9894
}

0 commit comments

Comments
 (0)