diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-10-22 21:33:27 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-10-23 12:21:41 +0200 |
commit | 1eb066eb752503658a4aedf6556ce52eb0326bd2 (patch) | |
tree | a8e1fe69fd0ba3aaf02826db0af8e762e202d55f /bin | |
parent | abb5b9b367c21166c3c366fe88351d6ef3a4659c (diff) |
list-uitest.py: use regex to find the bug id
Change-Id: Ieef4cf5594ec0b417617391dd0534f36844853e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104698
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/list-uitest.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/list-uitest.py b/bin/list-uitest.py index da670355635f..f04517436348 100755 --- a/bin/list-uitest.py +++ b/bin/list-uitest.py @@ -8,6 +8,7 @@ import os import datetime +import re def analyze_file(filename): class_name = "" @@ -37,9 +38,10 @@ def get_files_list(directory, extension): return array_items def linkFormat(name): - if name.startswith('tdf'): + bugId = re.search(r'\d{6}|\d{5}', name) + if bugId: return "[https://bugs.documentfoundation.org/show_bug.cgi?id={} {}]"\ - .format(name.split('tdf')[1], name) + .format(bugId.group(), name) else: return name @@ -67,10 +69,10 @@ def main(): for uitest_file in uitest_files: class_name, method_names = analyze_file(uitest_file) if class_name: - print("* {} ({})".format( + print("# {} ({})".format( linkFormat(class_name),uitest_file[3:])) for m in method_names: - print('**' + linkFormat(m)) + print('##' + linkFormat(m)) print() print('[[Category:QA]][[Category:Development]]') |