bin/list-uitest.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
New commits: commit 1eb066eb752503658a4aedf6556ce52eb0326bd2 Author: Xisco Fauli <[email protected]> AuthorDate: Thu Oct 22 21:33:27 2020 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Fri Oct 23 12:21:41 2020 +0200 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 <[email protected]> Reviewed-by: Xisco Fauli <[email protected]> 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]]') _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
