mirror of
https://github.com/ditkrg/todo-to-issue-action.git
synced 2026-01-25 15:22:59 +00:00
Fix case sensitivity
This commit is contained in:
14
main.py
14
main.py
@@ -292,11 +292,11 @@ class TodoParser(object):
|
|||||||
ADDITION_PATTERN = re.compile(r'(?<=^\+).*')
|
ADDITION_PATTERN = re.compile(r'(?<=^\+).*')
|
||||||
DELETION_PATTERN = re.compile(r'(?<=^-).*')
|
DELETION_PATTERN = re.compile(r'(?<=^-).*')
|
||||||
REF_PATTERN = re.compile(r'.+?(?=\))')
|
REF_PATTERN = re.compile(r'.+?(?=\))')
|
||||||
LABELS_PATTERN = re.compile(r'(?<=labels:\s).+')
|
LABELS_PATTERN = re.compile(r'(?<=labels:\s).+', re.IGNORECASE)
|
||||||
ASSIGNEES_PATTERN = re.compile(r'(?<=assignees:\s).+')
|
ASSIGNEES_PATTERN = re.compile(r'(?<=assignees:\s).+', re.IGNORECASE)
|
||||||
MILESTONE_PATTERN = re.compile(r'(?<=milestone:\s).+')
|
MILESTONE_PATTERN = re.compile(r'(?<=milestone:\s).+', re.IGNORECASE)
|
||||||
USER_PROJECTS_PATTERN = re.compile(r'(?<=user projects:\s).+')
|
USER_PROJECTS_PATTERN = re.compile(r'(?<=user projects:\s).+', re.IGNORECASE)
|
||||||
ORG_PROJECTS_PATTERN = re.compile(r'(?<=org projects:\s).+')
|
ORG_PROJECTS_PATTERN = re.compile(r'(?<=org projects:\s).+', re.IGNORECASE)
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
# Determine if the Issues should be escaped.
|
# Determine if the Issues should be escaped.
|
||||||
@@ -706,13 +706,13 @@ class TodoParser(object):
|
|||||||
title_identifier = None
|
title_identifier = None
|
||||||
for identifier in self.identifiers:
|
for identifier in self.identifiers:
|
||||||
title_identifier = identifier
|
title_identifier = identifier
|
||||||
title_pattern = re.compile(r'(?<=' + identifier + r'[\s:]).+')
|
title_pattern = re.compile(r'(?<=' + identifier + r'[\s:]).+', re.IGNORECASE)
|
||||||
title_search = title_pattern.search(comment, re.IGNORECASE)
|
title_search = title_pattern.search(comment, re.IGNORECASE)
|
||||||
if title_search:
|
if title_search:
|
||||||
title = title_search.group(0).strip()
|
title = title_search.group(0).strip()
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
title_ref_pattern = re.compile(r'(?<=' + identifier + r'\().+')
|
title_ref_pattern = re.compile(r'(?<=' + identifier + r'\().+', re.IGNORECASE)
|
||||||
title_ref_search = title_ref_pattern.search(comment, re.IGNORECASE)
|
title_ref_search = title_ref_pattern.search(comment, re.IGNORECASE)
|
||||||
if title_ref_search:
|
if title_ref_search:
|
||||||
title = title_ref_search.group(0).strip()
|
title = title_ref_search.group(0).strip()
|
||||||
|
|||||||
Reference in New Issue
Block a user