Skip to content

Commit

Permalink
[MINOR] fixed a logic to find issue number from title
Browse files Browse the repository at this point in the history
### What is this PR for?
Changed the regex to find a issue number from title. This doesn't change any code about Zeppelin, but this will effect helper script for committers

### What type of PR is it?
[Bug Fix]

### Todos
* [x] - Fixed the bug

### What is the Jira issue?
N/A

### How should this be tested?
```
>>> import re
>>> re.findall("ZEPPELIN-[0-9]{3,4}", "ZEPPELIN-123")
['ZEPPELIN-123']
>>> re.findall("ZEPPELIN-[0-9]{4,5}", "ZEPPELIN-123")
[]
>>> re.findall("ZEPPELIN-[0-9]{3,4,5}", "ZEPPELIN-123")
[]
>>> re.findall("ZEPPELIN-[0-9]{3}", "ZEPPELIN-123")
['ZEPPELIN-123']
>>> re.findall("ZEPPELIN-[0-9]{3,5}", "ZEPPELIN-123")
['ZEPPELIN-123']
>>> re.findall("ZEPPELIN-[0-9]{4,5}", "ZEPPELIN-123")
[]
>>> re.findall("ZEPPELIN-[0-9]{3,5}", "ZEPPELIN-123")
['ZEPPELIN-123']
```

### Screenshots (if appropriate)
N/A

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Jongyoul Lee <[email protected]>

Closes apache#936 from jongyoul/minor-find-issue-number-from-title and squashes the following commits:

63f37af [Jongyoul Lee] [MINOR] fixed logic to find issue number from title
c16117b [Jongyoul Lee] [MINOR] fixed logic to find issue number from title
  • Loading branch information
jongyoul committed Jun 1, 2016
1 parent f8bc54b commit 8a409a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dev/merge_zeppelin_pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def get_version_json(version_str):


def resolve_jira_issues(title, merge_branches, comment):
jira_ids = re.findall("ZEPPELIN-[0-9]{4,5}", title)
jira_ids = re.findall("ZEPPELIN-[0-9]{3,5}", title)

if len(jira_ids) == 0:
resolve_jira_issue(merge_branches, comment)
Expand Down

0 comments on commit 8a409a0

Please sign in to comment.