Reviewed-by: Bob Feng <bob.c.f...@intel.com> -----Original Message----- From: Kinney, Michael D <michael.d.kin...@intel.com> Sent: Friday, July 9, 2021 3:51 AM To: devel@edk2.groups.io Cc: Feng, Bob C <bob.c.f...@intel.com>; Liming Gao <gaolim...@byosoft.com.cn>; Chen, Christine <yuwei.c...@intel.com> Subject: [Patch V2 2/3] BaseTools/Scripts: Allow GitHub ID at end Maintainers.txt lines
* Update GetMaintainer.py to support an optional GitHub ID at the end of maintainer and reviewer lines. * Remove contents after email address from standard output * Fix minor issue in --lookup to convert file path separators from '\' to '/' to be compatible with regular expression file matching. Cc: Bob Feng <bob.c.f...@intel.com> Cc: Liming Gao <gaolim...@byosoft.com.cn> Cc: Yuwei Chen <yuwei.c...@intel.com> Signed-off-by: Michael D Kinney <michael.d.kin...@intel.com> --- BaseTools/Scripts/GetMaintainer.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BaseTools/Scripts/GetMaintainer.py b/BaseTools/Scripts/GetMaintainer.py index 5ec851554d64..d1e042c0afe4 100644 --- a/BaseTools/Scripts/GetMaintainer.py +++ b/BaseTools/Scripts/GetMaintainer.py @@ -18,7 +18,7 @@ EXPRESSIONS = { 'exclude': re.compile(r'^X:\s*(?P<exclude>.*?)\r*$'), 'file': re.compile(r'^F:\s*(?P<file>.*?)\r*$'), 'list': re.compile(r'^L:\s*(?P<list>.*?)\r*$'), - 'maintainer': re.compile(r'^M:\s*(?P<maintainer>.*<.*?>)\r*$'), + 'maintainer': re.compile(r'^M:\s*(?P<maintainer>.*?)\r*$'), 'reviewer': re.compile(r'^R:\s*(?P<reviewer>.*?)\r*$'), 'status': re.compile(r'^S:\s*(?P<status>.*?)\r*$'), 'tree': re.compile(r'^T:\s*(?P<tree>.*?)\r*$'), @@ -178,7 +178,7 @@ if __name__ == '__main__': SECTIONS = parse_maintainers_file(CONFIG_FILE) if ARGS.lookup: - FILES = [ARGS.lookup] + FILES = [ARGS.lookup.replace('\\','/')] else: FILES = get_modified_files(REPO, ARGS) @@ -191,4 +191,6 @@ if __name__ == '__main__': ADDRESSES += addresslist for address in list(OrderedDict.fromkeys(ADDRESSES)): + if '<' in address and '>' in address: + address = address.split('>', 1)[0] + '>' print(' %s' % address) -- 2.32.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#77624): https://edk2.groups.io/g/devel/message/77624 Mute This Topic: https://groups.io/mt/84076274/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-