Compare commits

...

3 Commits

Author SHA1 Message Date
bashonly
8c8f06c726
allow "bug fix"
bug fix for 69f1a88f5e
Authored by: bashonly
2024-10-27 17:41:47 -05:00
bashonly
e60d425239
do not overwrite commit title fixes
Authored by: bashonly
2024-10-27 17:32:19 -05:00
bashonly
69f1a88f5e
extend _FIXES_RE
Authored by: bashonly
2024-10-27 17:31:16 -05:00

View File

@ -251,7 +251,7 @@ class CommitRange:
''', re.VERBOSE | re.DOTALL)
EXTRACTOR_INDICATOR_RE = re.compile(r'(?:Fix|Add)\s+Extractors?', re.IGNORECASE)
REVERT_RE = re.compile(r'(?:\[[^\]]+\]\s+)?(?i:Revert)\s+([\da-f]{40})')
FIXES_RE = re.compile(r'(?i:Fix(?:es)?(?:\s+bugs?)?(?:\s+in|\s+for)?|Improve)\s+([\da-f]{40})')
FIXES_RE = re.compile(r'(?i:(?:bug\s*)?fix(?:es)?(?:\s+bugs?)?(?:\s+in|\s+for)?|Improve)\s+([\da-f]{40})')
UPSTREAM_MERGE_RE = re.compile(r'Update to ytdl-commit-([\da-f]+)')
def __init__(self, start, end, default_author=None):
@ -293,7 +293,7 @@ class CommitRange:
for line in iter(lambda: next(lines), self.COMMIT_SEPARATOR):
if match := self.AUTHOR_INDICATOR_RE.match(line):
authors = sorted(map(str.strip, line[match.end():].split(',')), key=str.casefold)
if match := self.FIXES_RE.fullmatch(line):
if not fix_commitish and (match := self.FIXES_RE.fullmatch(line)):
fix_commitish = match.group(1)
commit = Commit(commit_hash, short, authors)