Skip to content

Commit da28cc9

Browse files
committed
Merge branch 'main' into queue-event
2 parents 809e675 + 339faed commit da28cc9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Services/WebhookService.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ protected function hasFieldTemplate(array $payload): bool
5050
{
5151
$fieldType = $payload['changes']['field_value']['field_type'] ?? '';
5252

53-
return view()->exists('github-project::md.fields.'.$fieldType);
53+
return view()->exists('github-project::md.field_types.'.$fieldType);
5454
}
5555

5656
protected function createErrorResponse(string $message, int $statusCode = 400): JsonResponse
@@ -93,7 +93,9 @@ public function validatePayload(array $payload): ?JsonResponse
9393
*/
9494
protected function isStatusCommentEnabled(array $payload): bool
9595
{
96-
if ((string) $payload['changes']['field_value']['field_name'] === 'Status'
96+
$fieldType = $payload['changes']['field_value']['field_type'] ?? '';
97+
98+
if ((string) $fieldType === 'Status'
9799
&& !config('github-project.enable_status_comment')
98100
) {
99101
return false;

0 commit comments

Comments
 (0)