Skip to content

Commit

Permalink
fix(webhook): result message webhook (#4221)
Browse files Browse the repository at this point in the history
## Problem

Webhook result message contains twice successfully
  • Loading branch information
npalm authored Oct 29, 2024
1 parent 380bcaf commit 8099c17
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lambdas/functions/webhook/src/webhook/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ export async function publishOnEventBridge(
let response: Response = { body: '', statusCode: 201 };
if (!checkBodySizeResult.sizeExceeded) {
await publishEvent(config.eventBusName, `github`, eventType, body);
response = { statusCode: 201, body: 'Event sent successfully to EventBridge successfully.' };
response = {
statusCode: 201,
body: `Event sent successfully to the EventBridge.`,
};
} else {
await publishEvent(config.eventBusName, 'runners.webhook', `error.${eventType}`, checkBodySizeResult.message);
logger.warn('Github event body size exceeded 256KB');
Expand Down

0 comments on commit 8099c17

Please sign in to comment.