From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web09.1340.1625773863150719221 for ; Thu, 08 Jul 2021 12:51:03 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: michael.d.kinney@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10039"; a="189264533" X-IronPort-AV: E=Sophos;i="5.84,224,1620716400"; d="scan'208";a="189264533" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2021 12:50:59 -0700 X-IronPort-AV: E=Sophos;i="5.84,224,1620716400"; d="scan'208";a="498556765" Received: from mdkinney-mobl2.amr.corp.intel.com ([10.209.0.86]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2021 12:50:58 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Yuwei Chen Subject: [Patch V2 2/3] BaseTools/Scripts: Allow GitHub ID at end Maintainers.txt lines Date: Thu, 8 Jul 2021 12:50:46 -0700 Message-Id: <20210708195047.1649-3-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.32.0.windows.1 In-Reply-To: <20210708195047.1649-1-michael.d.kinney@intel.com> References: <20210708195047.1649-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit * 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 Cc: Liming Gao Cc: Yuwei Chen Signed-off-by: Michael D Kinney --- 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.*?)\r*$'), 'file': re.compile(r'^F:\s*(?P.*?)\r*$'), 'list': re.compile(r'^L:\s*(?P.*?)\r*$'), - 'maintainer': re.compile(r'^M:\s*(?P.*<.*?>)\r*$'), + 'maintainer': re.compile(r'^M:\s*(?P.*?)\r*$'), 'reviewer': re.compile(r'^R:\s*(?P.*?)\r*$'), 'status': re.compile(r'^S:\s*(?P.*?)\r*$'), 'tree': re.compile(r'^T:\s*(?P.*?)\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