This repository was archived by the owner on Aug 6, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
cdk-infra/lib/constructs/api Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,9 @@ export class WebhookApiConstruct extends Construct {
133133 const localEndpoint = webhookEndpoint . addResource ( 'local' ) ;
134134 const snootyEndpoint = webhookEndpoint . addResource ( 'snooty' ) ;
135135
136+ // Shared /githubEndpoint/trigger endpoint
137+ const githubEndpointTrigger = githubEndpoint . addResource ( 'trigger' ) ;
138+
136139 const defaultCorsPreflightOptions : CorsOptions = {
137140 allowOrigins : Cors . ALL_ORIGINS ,
138141 } ;
@@ -153,13 +156,11 @@ export class WebhookApiConstruct extends Construct {
153156 . addResource ( 'upsert' , { defaultCorsPreflightOptions } )
154157 . addMethod ( 'POST' , new LambdaIntegration ( dochubTriggerUpsertLambda ) ) ;
155158
156- githubEndpoint
157- . addResource ( 'trigger' )
159+ githubEndpointTrigger
158160 . addResource ( 'build' , { defaultCorsPreflightOptions } )
159161 . addMethod ( 'POST' , new LambdaIntegration ( githubTriggerLambda ) ) ;
160162
161- githubEndpoint
162- . addResource ( 'trigger' )
163+ githubEndpointTrigger
163164 . addResource ( 'delete' , { defaultCorsPreflightOptions } )
164165 . addMethod ( 'POST' , new LambdaIntegration ( githubDeleteArtifactsLambda ) ) ;
165166
You can’t perform that action at this time.
0 commit comments