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.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
This commit is contained in:
		
				
					committed by
					
						
						mergify[bot]
					
				
			
			
				
	
			
			
			
						parent
						
							8781b143de
						
					
				
				
					commit
					28ef05ce10
				
			@@ -18,7 +18,7 @@ EXPRESSIONS = {
 | 
				
			|||||||
    'exclude':    re.compile(r'^X:\s*(?P<exclude>.*?)\r*$'),
 | 
					    'exclude':    re.compile(r'^X:\s*(?P<exclude>.*?)\r*$'),
 | 
				
			||||||
    'file':       re.compile(r'^F:\s*(?P<file>.*?)\r*$'),
 | 
					    'file':       re.compile(r'^F:\s*(?P<file>.*?)\r*$'),
 | 
				
			||||||
    'list':       re.compile(r'^L:\s*(?P<list>.*?)\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*$'),
 | 
					    'reviewer':   re.compile(r'^R:\s*(?P<reviewer>.*?)\r*$'),
 | 
				
			||||||
    'status':     re.compile(r'^S:\s*(?P<status>.*?)\r*$'),
 | 
					    'status':     re.compile(r'^S:\s*(?P<status>.*?)\r*$'),
 | 
				
			||||||
    'tree':       re.compile(r'^T:\s*(?P<tree>.*?)\r*$'),
 | 
					    'tree':       re.compile(r'^T:\s*(?P<tree>.*?)\r*$'),
 | 
				
			||||||
@@ -178,7 +178,7 @@ if __name__ == '__main__':
 | 
				
			|||||||
    SECTIONS = parse_maintainers_file(CONFIG_FILE)
 | 
					    SECTIONS = parse_maintainers_file(CONFIG_FILE)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if ARGS.lookup:
 | 
					    if ARGS.lookup:
 | 
				
			||||||
        FILES = [ARGS.lookup]
 | 
					        FILES = [ARGS.lookup.replace('\\','/')]
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
        FILES = get_modified_files(REPO, ARGS)
 | 
					        FILES = get_modified_files(REPO, ARGS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -191,4 +191,6 @@ if __name__ == '__main__':
 | 
				
			|||||||
            ADDRESSES += addresslist
 | 
					            ADDRESSES += addresslist
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for address in list(OrderedDict.fromkeys(ADDRESSES)):
 | 
					    for address in list(OrderedDict.fromkeys(ADDRESSES)):
 | 
				
			||||||
 | 
					        if '<' in address and '>' in address:
 | 
				
			||||||
 | 
					            address = address.split('>', 1)[0] + '>'
 | 
				
			||||||
        print('  %s' % address)
 | 
					        print('  %s' % address)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user