File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -15,18 +15,16 @@ const githubWebhooks = new Set([
15
15
] )
16
16
17
17
const shouldProcessCreateWorkflows = ( message ) => {
18
- const repoName = message . repository ?. name
19
- const workflowName = message . workflow_run . name
20
-
21
- const infraDevTfSvcInfraRun =
22
- repoName === gitHubRepoConfig . cdpTfSvcInfra &&
23
- workflowName . toLocaleLowerCase ( ) . includes ( 'infra-dev' )
24
-
25
- return (
26
- message . github_event === 'workflow_run' &&
27
- githubWebhooks . has ( repoName ) &&
28
- ! infraDevTfSvcInfraRun
29
- )
18
+ if ( message ?. github_event === 'workflow_run' ) {
19
+ const repoName = message . repository ?. name
20
+ const workflowName = message . workflow_run ?. name
21
+ const infraDevTfSvcInfraRun =
22
+ repoName === gitHubRepoConfig . cdpTfSvcInfra &&
23
+ workflowName . toLocaleLowerCase ( ) . includes ( 'infra-dev' )
24
+
25
+ return githubWebhooks . has ( repoName ) && ! infraDevTfSvcInfraRun
26
+ }
27
+ return false
30
28
}
31
29
32
30
const shouldProcessPortalJourneyTests = ( message ) => {
You can’t perform that action at this time.
0 commit comments