Skip to content

Commit c8a452f

Browse files
committed
feat: add condition to check missing template for field types
1 parent 41c7f12 commit c8a452f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lang/en/github-project.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
'denied' => 'The event was denied.',
1111
'action_not_found' => 'Not an action event.',
1212
'missing_fields' => 'Missing required fields.',
13+
'missing_field_template' => 'Missing field template.',
1314
'status_comment_disabled' => 'Status comment is disabled.',
1415
],
1516
],

src/Services/WebhookService.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ public function validatePayload(array $payload): ?JsonResponse
5858
);
5959
}
6060

61+
if (view()->exists('github-project::md.fields.'.$fieldData['field_type'])) {
62+
return response()->json(
63+
['message' => __('github-project::github-project.error.event.missing_field_template')],
64+
400
65+
);
66+
}
67+
6168
return null;
6269
}
6370

0 commit comments

Comments
 (0)