File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ protected function eventApproved(string $event): bool
2626 return str_contains ($ event , 'project ' );
2727 }
2828
29+ /**
30+ * @param array<string, mixed> $payload
31+ */
2932 protected function isActionPresent (array $ payload ): bool
3033 {
3134 return isset ($ payload ['action ' ]);
@@ -48,7 +51,7 @@ protected function hasFieldTemplate(array $payload): bool
4851 return view ()->exists ('github-project::md.fields. ' .$ fieldType );
4952 }
5053
51- protected function createErrorResponse (string $ message , ? int $ statusCode = 400 ): JsonResponse
54+ protected function createErrorResponse (string $ message , int $ statusCode = 400 ): JsonResponse
5255 {
5356 return response ()->json (['message ' => __ ($ message )], $ statusCode );
5457 }
@@ -88,8 +91,9 @@ public function validatePayload(array $payload): ?JsonResponse
8891 */
8992 protected function isStatusCommentEnabled (array $ payload ): bool
9093 {
91- $ fieldName = (string ) $ payload ['changes ' ]['field_value ' ]['field_name ' ] ?? '' ;
92- if ($ fieldName === 'Status ' && !config ('github-project.enable_status_comment ' )) {
94+ if ((string ) $ payload ['changes ' ]['field_value ' ]['field_name ' ] === 'Status '
95+ && !config ('github-project.enable_status_comment ' )
96+ ) {
9397 return false ;
9498 }
9599
You can’t perform that action at this time.
0 commit comments