Skip to content
This repository was archived by the owner on Oct 4, 2024. It is now read-only.

Commit 501a475

Browse files
committed
handle additional webhook structure
1 parent 97a1dea commit 501a475

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed
10 Bytes
Binary file not shown.

functions/source/GitPullS3/lambda_function.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,10 @@ def lambda_handler(event, context):
152152
try:
153153
full_name = event['body-json']['repository']['full_name']
154154
except KeyError:
155-
full_name = event['body-json']['repository']['fullName']
155+
try:
156+
full_name = event['body-json']['repository']['fullName']
157+
except KeyError:
158+
full_name = event['body-json']['repository']['path_with_namespace']
156159
if not secure:
157160
logger.error('Source IP %s is not allowed' % event['context']['source-ip'])
158161
raise Exception('Source IP %s is not allowed' % event['context']['source-ip'])

0 commit comments

Comments
 (0)