airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlo...@apache.org
Subject [1/3] incubator-airflow git commit: [AIRFLOW-185] Handle empty versions list
Date Thu, 02 Jun 2016 16:40:11 GMT
Repository: incubator-airflow
Updated Branches:
  refs/heads/master dce08f68b -> f72b0d33b


[AIRFLOW-185] Handle empty versions list


Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/c6ae582f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/c6ae582f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/c6ae582f

Branch: refs/heads/master
Commit: c6ae582f83b4aace8e911d9f9e9324fe7e392fac
Parents: 2c79099
Author: jlowin <jlowin@apache.org>
Authored: Fri May 27 13:52:36 2016 -0400
Committer: jlowin <jlowin@users.noreply.github.com>
Committed: Wed Jun 1 15:00:04 2016 -0400

----------------------------------------------------------------------
 dev/airflow-pr | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/c6ae582f/dev/airflow-pr
----------------------------------------------------------------------
diff --git a/dev/airflow-pr b/dev/airflow-pr
index d20a8e1..7c36e40 100755
--- a/dev/airflow-pr
+++ b/dev/airflow-pr
@@ -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


Mime
View raw message