Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2196566rdh; Tue, 26 Sep 2023 16:05:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEX9LbQ2S+/psOyMrn1n6sWaLbwyur3AGHqLogZ41eVQKnecHnZnHXVZkCSxmS8aNRUm8ll X-Received: by 2002:a81:9e48:0:b0:59b:fc99:8e5 with SMTP id n8-20020a819e48000000b0059bfc9908e5mr438071ywj.29.1695769551285; Tue, 26 Sep 2023 16:05:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695769551; cv=none; d=google.com; s=arc-20160816; b=Tu4vHu7WRn3O6VTpTRI1iUxNmOmJ7uG0FS43fhYFINHqeNfEIffZtljfQtUtQurp5w 30fu6NXWBhMqFBeqSEk66j1e/z17XZwmwkQJI/4OlvYuwQ9ONNBMSM70D+UvaaELXJXY IuEEXz8ZNhxtfct+U/mg5ui/wzUV8QCGRbOUfn1JYRcg3V2XpqKpyetPNenZEZwDCWdR KnuKjyPtESnAyshF7g+a/fDqxNY1yssBF5dk/iOV4UKqcuwJ2NR8CYi2myn4fW/kAVpG ZAEMG9bKfh2oMUlOxE1ge5sDgQPaIiSE05X4ewZyH9lam+Li8UmS7YIyyVrXCuP/L3w/ FNrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2a8ACoHIsGvcVxr5BZ9tsHiiT+SNT7xd5y69XlnJqQY=; fh=lPNRFgCrLd3+lMa+LjGFfn6ax/BTDE4xy+xQKyjgDls=; b=tOAzrDoXzHifBHE7VL8J199q94cPwNs6US46yI8s/okAFAfSmUDZ2peBY4cbEblYrX jEr+r0fY5zrrf0b/bjWxmUXH9WQuPAz8JaDHjPrbrvLBAAl0tIjqBMIrXacFZCrLCjbW Ou8zTYJA9KxlU/LiM0TspTm+VBJAaXJh2DKjdG90p4MNbsfYNCbWwsnmv3CGZTNYGoek MxQtrShO9TkDZuhX7wAMKr4UOPeIqetPpHXt7+pv0cnaNGrc8msLbXycyl7B8jeCcR55 LjjpD26mn/UGVoiHfBHY6xKwcv8k6tv/y8sMAk4N8K/5n4a//DV58wDIOKs1kJjjgphe VH4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=J7lTwAph; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id s16-20020a656450000000b0056c4189d6d9si13777700pgv.836.2023.09.26.16.05.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 16:05:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=J7lTwAph; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 71ADB8374E48; Tue, 26 Sep 2023 05:03:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234511AbjIZMDD (ORCPT + 99 others); Tue, 26 Sep 2023 08:03:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233884AbjIZMDC (ORCPT ); Tue, 26 Sep 2023 08:03:02 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E431E6; Tue, 26 Sep 2023 05:02:53 -0700 (PDT) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38QBGOHk009562; Tue, 26 Sep 2023 12:02:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=qcppdkim1; bh=2a8ACoHIsGvcVxr5BZ9tsHiiT+SNT7xd5y69XlnJqQY=; b=J7lTwAphiiWiKHxu+WgZCtz2LozTWomlVQwehhqeNAdNpUmUsFkHrS3dJSiElv3CEPZd nEEQI4YoHvSE9BecfzfnLaH8/WEssbfNvTjMUQO1rZVgW3Q3RC25ExS3yMlsckIOb7yv NBO6sME/INbBey7rW0sPumiS/UQ5mHPkk62FkAcfRoml7BWL1kSreVihFdquCOsLXMFR Cs5LvoZ4UOxVsP9DiHcw32CabcGmYd8ZqjQTcERWLNt7XGnUorrV3JLxPEfQqdzlUXzz cHtfU2uE4kVEb1SjY5xbUnS5rVCkjJX78HZbLxZdtTlc5ek7zgbPyTnhPBDPay8EMyH9 Tg== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3tb72sk4kf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Sep 2023 12:02:22 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 38QC2Ln2010849 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Sep 2023 12:02:21 GMT Received: from hu-pkondeti-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.36; Tue, 26 Sep 2023 05:02:13 -0700 Date: Tue, 26 Sep 2023 17:32:10 +0530 From: Pavan Kondeti To: Guru Das Srinagesh CC: Masahiro Yamada , Nick Desaulniers , Andrew Morton , "Nicolas Schier" , Konstantin Ryabitsev , Kees Cook , "Bjorn Andersson" , , , Will Deacon , "Greg Kroah-Hartman" , , , , , , , , , Subject: Re: [PATCH v3 1/1] scripts: Add add-maintainer.py Message-ID: References: <141b9fcab2208ace3001df4fc10e3dfd42b9f5d9.1693037031.git.quic_gurus@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <141b9fcab2208ace3001df4fc10e3dfd42b9f5d9.1693037031.git.quic_gurus@quicinc.com> X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: NatgBplqSlxKxQknsktnvf_838ZElKmd X-Proofpoint-ORIG-GUID: NatgBplqSlxKxQknsktnvf_838ZElKmd X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-26_07,2023-09-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 mlxscore=0 priorityscore=1501 lowpriorityscore=0 clxscore=1011 malwarescore=0 adultscore=0 mlxlogscore=661 spamscore=0 suspectscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2309260104 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 26 Sep 2023 05:03:04 -0700 (PDT) On Sat, Aug 26, 2023 at 01:07:42AM -0700, Guru Das Srinagesh wrote: > +def gather_maintainers_of_file(patch_file): > + all_entities_of_patch = dict() > + > + # Run get_maintainer.pl on patch file > + logging.info("GET: Patch: {}".format(os.path.basename(patch_file))) > + cmd = ['scripts/get_maintainer.pl'] > + cmd.extend([patch_file]) > + > + try: > + p = subprocess.run(cmd, stdout=subprocess.PIPE, check=True) > + except: > + sys.exit(1) > + > + logging.debug("\n{}".format(p.stdout.decode())) > + > + entries = p.stdout.decode().splitlines() > + > + maintainers = [] > + lists = [] > + others = [] > + > + for entry in entries: > + entity = entry.split('(')[0].strip() > + if any(role in entry for role in ["maintainer", "reviewer"]): > + maintainers.append(entity) > + elif "list" in entry: > + lists.append(entity) > + else: > + others.append(entity) > + > + all_entities_of_patch["maintainers"] = set(maintainers) > + all_entities_of_patch["lists"] = set(lists) > + all_entities_of_patch["others"] = set(others) > + > + return all_entities_of_patch > + FYI, there are couple of issues found while playing around. - Some entries in MAINTAINERS could be "supporter" - When names contain ("company"), the script fails to extract name. Thanks, Pavan diff --git a/scripts/add-maintainer.py b/scripts/add-maintainer.py index 5a5cc9482b06..6aa5e7941172 100755 --- a/scripts/add-maintainer.py +++ b/scripts/add-maintainer.py @@ -29,8 +29,8 @@ def gather_maintainers_of_file(patch_file): others = [] for entry in entries: - entity = entry.split('(')[0].strip() - if any(role in entry for role in ["maintainer", "reviewer"]): + entity = entry.rsplit('(', 1)[0].strip() + if any(role in entry for role in ["maintainer", "reviewer", "supporter"]): maintainers.append(entity) elif "list" in entry: lists.append(entity) Thanks, Pavan