mirror of
https://github.com/apache/sqoop.git
synced 2025-05-19 02:10:54 +08:00
SQOOP-1104. Sqoop2: Allow versioned patches in the PreCommit hook
(Jarek Jarcec Cecho via Hari Shreedharan)
This commit is contained in:
parent
d62567ddf3
commit
60a909f30b
@ -135,7 +135,7 @@ def jira_post_comment(result, defect, branch, username, password):
|
|||||||
# hack (from hadoop) but REST api doesn't list attachments?
|
# hack (from hadoop) but REST api doesn't list attachments?
|
||||||
def jira_get_attachment(result, defect, username, password):
|
def jira_get_attachment(result, defect, username, password):
|
||||||
html = jira_get_defect_html(result, defect, username, password)
|
html = jira_get_defect_html(result, defect, username, password)
|
||||||
pattern = "(/secure/attachment/[0-9]+/(bug)?%s[0-9\-]*\.(patch|txt|patch\.txt))" % (re.escape(defect))
|
pattern = "(/secure/attachment/[0-9]+/(bug)?%s[0-9\-]*((\.|-)[0-9]+)?\.(patch|txt|patch\.txt))" % (re.escape(defect))
|
||||||
matches = []
|
matches = []
|
||||||
for match in re.findall(pattern, html, re.IGNORECASE):
|
for match in re.findall(pattern, html, re.IGNORECASE):
|
||||||
matches += [ match[0] ]
|
matches += [ match[0] ]
|
||||||
|
Loading…
Reference in New Issue
Block a user