HADOOP-18251. Fix failure of extracting JIRA id from commit message in git_jira_fix_version_check.py. (#4344)

(cherry picked from commit 6b331dde31)
This commit is contained in:
Masatake Iwasaki 2022-05-26 12:23:30 +09:00
parent ae9d671232
commit 241fb6b2a7
1 changed files with 3 additions and 4 deletions

View File

@ -71,10 +71,9 @@
print("Commit seems reverted. \t\t\t Commit: " + commit)
continue
ACTUAL_PROJECT_JIRA = None
for project_jira in project_jira_keys:
if project_jira in commit:
ACTUAL_PROJECT_JIRA = project_jira
break
matches = re.findall('|'.join(project_jira_keys), commit)
if matches:
ACTUAL_PROJECT_JIRA = matches[0]
if not ACTUAL_PROJECT_JIRA:
print("WARN: Jira not found. \t\t\t Commit: " + commit)
continue