Repository: incubator-griffin
Updated Branches:
  refs/heads/master 94969400f -> 1dcad9658


GRIFFIN-6 : FIX regex error when selecting jira task id

Author: William Guo <[email protected]>

Closes #13 from guoyuepeng/fix-jira-id-regex.


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

Branch: refs/heads/master
Commit: 1dcad9658ed7980f47fe2d286c8a77d65701afca
Parents: 9496940
Author: William Guo <[email protected]>
Authored: Thu Mar 30 19:01:23 2017 +0800
Committer: William Guo <[email protected]>
Committed: Thu Mar 30 19:01:23 2017 +0800

----------------------------------------------------------------------
 merge_pr.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/1dcad965/merge_pr.py
----------------------------------------------------------------------
diff --git a/merge_pr.py b/merge_pr.py
index f916546..ef9ee36 100755
--- a/merge_pr.py
+++ b/merge_pr.py
@@ -229,7 +229,7 @@ def fix_version_from_branch(branch, versions):
         return filter(lambda x: x.name.startswith(branch_ver), versions)[-1]
 
 
-def resolve_jira_issue(merge_branches, comment, default_jira_id="GRIFFIN-5"):
+def resolve_jira_issue(merge_branches, comment, default_jira_id="5"):
     asf_jira = jira.client.JIRA({'server': JIRA_API_BASE},
                                 basic_auth=(JIRA_USERNAME, JIRA_PASSWORD))
 
@@ -238,7 +238,7 @@ def resolve_jira_issue(merge_branches, comment, 
default_jira_id="GRIFFIN-5"):
         jira_id = default_jira_id
 
     try:
-        issue = asf_jira.issue("GRIFFIN-%s" % (jira_id))
+        issue = asf_jira.issue("%s" % (jira_id))
     except Exception as e:
         fail("ASF JIRA could not find %s\n%s" % (jira_id, e))
 
@@ -295,7 +295,7 @@ def resolve_jira_issue(merge_branches, comment, 
default_jira_id="GRIFFIN-5"):
 
 
 def resolve_jira_issues(title, merge_branches, comment):
-    jira_ids = re.findall("GRIFFIN-[0-9]{4,5}", title)
+    jira_ids = re.findall("GRIFFIN-[0-9]{1,5}", title)
 
     if len(jira_ids) == 0:
         resolve_jira_issue(merge_branches, comment)

Reply via email to