[AIRFLOW-185] Handle empty versions list

This commit is contained in:
jlowin 2016-05-27 13:52:36 -04:00 коммит произвёл jlowin
Родитель 2c79099bb2
Коммит c6ae582f83
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -402,8 +402,12 @@ def resolve_jira_issue(comment=None, jira_id=None, merge_branches=None):
versions = list(filter(
lambda x: re.match('\d+\.\d+\.\d+', x.name), versions))
default_fix_versions = map(
lambda x: fix_version_from_branch(x, versions).name, merge_branches)
if versions:
default_fix_versions = map(
lambda x: fix_version_from_branch(x, versions).name, merge_branches)
else:
default_fix_versions = []
for v in default_fix_versions:
# Handles the case where we have forked a release branch but not yet made the release.
# In this case, if the PR is committed to the master branch and the release branch, we