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

Commit 9608346

Browse files
author
Vitali Yakavenka
committed
Merge remote-tracking branch 'upstream/develop' into support_branches_tags
2 parents f00d36c + f32f898 commit 9608346

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed
0 Bytes
Binary file not shown.

functions/source/GitPullS3/lambda_function.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,12 @@ def lambda_handler(event, context):
172172
branch_name = 'tags/%s' % event['body-json']['release']['tag_name']
173173
repo_name = full_name + '/release'
174174
else:
175-
# branch names should contain [name] only, tag names - "tags/[name]"
176-
branch_name = event['body-json']['ref'].replace('refs/heads/', '').replace('refs/tags/', 'tags/')
177175
repo_name = full_name
176+
try:
177+
# branch names should contain [name] only, tag names - "tags/[name]"
178+
branch_name = event['body-json']['ref'].replace('refs/heads/', '').replace('refs/tags/', 'tags/')
179+
except:
180+
branch_name = 'master'
178181
try:
179182
# GitLab
180183
remote_url = event['body-json']['project']['git_ssh_url']

0 commit comments

Comments
 (0)