diff --git a/functions/source/GitPullS3/lambda_function.py b/functions/source/GitPullS3/lambda_function.py index 4686be2..3d18384 100644 --- a/functions/source/GitPullS3/lambda_function.py +++ b/functions/source/GitPullS3/lambda_function.py @@ -191,7 +191,11 @@ def lambda_handler(event, context): # Bibucket server branch_name = event['body-json']['push']['changes'][0]['new']['name'] except: - branch_name = 'master' + # Bitbucket Server v6.6.1 + try: + branch_name = event['body-json']['changes'][0]['ref']['displayId'] + except: + branch_name = 'master' try: # GitLab remote_url = event['body-json']['project']['git_ssh_url']