From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9A5CBA0510 for ; Fri, 15 Apr 2022 12:16:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 93D4540687; Fri, 15 Apr 2022 12:16:34 +0200 (CEST) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam07on2041.outbound.protection.outlook.com [40.107.95.41]) by mails.dpdk.org (Postfix) with ESMTP id E82314067C for ; Fri, 15 Apr 2022 12:16:32 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hPLYOV+LeAbCjhA4Yptmk4RzrD3rqk/+F8Eo19YnEFop/jc+utk9u93Ee1ffAGFXBw7K+0nQT0y12aqzN5gHJ23cO1oX6Li07N0FwEdWJE35en+MfXtWhUO26xHBpPimN2WnyYD9X3ZX96IBZ/Um6RIg4EFHwwewCknrI2rXILEmjU0xfOc+A1eDmeDSkIrF3T/x6jL1ArwlYWnPJLd08RHPEqgn/W92tZJ9dnFN3s6/ap7x2XRlMG+JAYsdB+8vupn6NyzYfHaB0DnxdEsoTsdxRBooUs3WPiGrKkBxgplikhVkl/ox/rbb0JCmPAMBrcoPAHddr95fVRqRAhCPpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Gg5CcedWHkHLk7G+Q1nvYUy1AfiK62h+MDco3ny5s3I=; b=BGxF3uVFa2aYuQWG5V/1fT3WtLM4LU+cmgIeHi/lyktiI6W5ycyM4/fLK+cRT95PaKZQWfNKzASQ9arfae1gDecSc2pMP3MD0KUeHjtbNYcRZgwJwiSOp2W6m2Rnq5lRFEWtXTv09o2vmEsl/0Waha2sjTz8m0GrH9UCJH5RYB77MWVEEK/s78aIZmHDNrXonvQSP35x7ScSiN02bNxq4P6XDuuFyaDJ9aqTZGwhf91B5xaKPIB1FAxAS2fG9PxsLxhB/AE/8WTVGMfV4k+J3AzLUG9Mk37fqoENifCeuECukGigd5G3G6ZGDptDwj7zDOU0VFF3vpTG1B9A75yCqA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.236) smtp.rcpttodomain=redhat.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Gg5CcedWHkHLk7G+Q1nvYUy1AfiK62h+MDco3ny5s3I=; b=O9/S4I58NDYSja+kncfSsB7BNTsvfGdhnYvU2FTnXbCl7hjdg3Mhr/tTaLme6tm8dK5UdTVcB7HI1n2pJIBZCB0pVml0pa0nU9ktyibVOY/dwgKklN13LCpCOpoGU6usiHUO1l6jkRIe0TPKiygV2ddyNAt7sPL67iqJ573P9gFWk5EapWE/oDfz8mEeZG0h6DO4yRCnXISeLqc7KeINPUEE6X4dvFEsppC0WLjden9aS6o05Qog/M66zBJ5t8b7MRYhx3yNyeW8x4zxHc6o8BwJQs/FsMUOvQpsGlEwn0OptBiS6/I1rN5NJwXqLZdmVRaFh79K36XNwCiTAoEcJw== Received: from BN8PR12CA0004.namprd12.prod.outlook.com (2603:10b6:408:60::17) by DM6PR12MB3050.namprd12.prod.outlook.com (2603:10b6:5:11a::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.29; Fri, 15 Apr 2022 10:16:31 +0000 Received: from BN8NAM11FT045.eop-nam11.prod.protection.outlook.com (2603:10b6:408:60:cafe::26) by BN8PR12CA0004.outlook.office365.com (2603:10b6:408:60::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.18 via Frontend Transport; Fri, 15 Apr 2022 10:16:30 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.236) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.236 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.236; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.236) by BN8NAM11FT045.mail.protection.outlook.com (10.13.177.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5164.19 via Frontend Transport; Fri, 15 Apr 2022 10:16:30 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL109.nvidia.com (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Fri, 15 Apr 2022 10:16:29 +0000 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Fri, 15 Apr 2022 03:16:27 -0700 From: Ali Alnubani To: CC: David Marchand Subject: [PATCH 1/2] pw_maintainers_cli: try delegating to multiple maintainers Date: Fri, 15 Apr 2022 13:16:10 +0300 Message-ID: <20220415101611.364-1-alialnu@nvidia.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d37d8ce3-3c0a-455b-5f09-08da1ec9029a X-MS-TrafficTypeDiagnostic: DM6PR12MB3050:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qkA3P6c4JIUkH2G9TXk86CRiTXJIR787PpNJDyIOc0svBpsR+aiDOFqTPn/JJrVf0C6K44DvxkIOUdb3JyDnGvJ814FNG0gAzy4LhMm15zaDJGx9i8ZcBCFnLOmkybh8FP+7zOZEuje6vNSMcQR6Zj6MY/0pauAtcNYY6KZzVe+BiAjX4xJU1iFdtIyKieRVr2Gw7k3sgh60u6xUUaBHnuR4wQ1dNj/KRIxc/x5GSOAxzT4iwynUPNCW10QxakscSxZ0jEfA+zD7XDgmr9/q5UiSXybFcTTjMMNs4K5V0O7+S9nU22YNK/DlzBcFp5U/wFCBmT3G/OpMBDaRmJP8bezord6UQV4mp63K6GZPuL2ym/LqNZMplT6N1+86Z37c9AZrpXxcoKje/34cfaknoJeh6A0+7HDZZmxQqPaGFWV87/+eO4o2weS8Z6n3ciTRoq3L4B9F9z0DO3disde+M6SxOSSazFnqXXy2RdyTQ7S9fdzez7pGtOcN4puJffp6nXT526M3uJD5298HqwkscF5YkR+s7+9DzSX3/0XZ0suGmZcl8yRm1gp6FLmEU1UMe6k9WYMjwW3/v3IY1LEzpZJajMKh2JmPMgoezm592OcDXGu3pBfTyzRBdmi+uVPjAXzfRY3wIB81bHQ9QTjC6hKhLD/b4jWLmNyXc1CfJAKnET9Lqc3vNk16MDTjpR7x2eExcznzAxSGj5ldcqxHJQ== X-Forefront-Antispam-Report: CIP:12.22.5.236; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(46966006)(40470700004)(36840700001)(356005)(6286002)(36756003)(81166007)(426003)(186003)(40460700003)(508600001)(86362001)(2906002)(6916009)(7696005)(6666004)(336012)(4326008)(2616005)(316002)(1076003)(5660300002)(47076005)(8676002)(82310400005)(16526019)(83380400001)(70206006)(70586007)(36860700001)(26005)(8936002)(55016003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2022 10:16:30.5558 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d37d8ce3-3c0a-455b-5f09-08da1ec9029a X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.236]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT045.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3050 X-BeenThere: ci@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK CI discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ci-bounces@dpdk.org Instead of skipping patch delegation when there are no Patchwork users associated with the email of the first maintainer, try to delegate to other tree maintainers. Suggested-by: David Marchand Signed-off-by: Ali Alnubani --- tools/pw_maintainers_cli.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/tools/pw_maintainers_cli.py b/tools/pw_maintainers_cli.py index fd69081..ad51e3d 100755 --- a/tools/pw_maintainers_cli.py +++ b/tools/pw_maintainers_cli.py @@ -112,6 +112,7 @@ class GitPW(object): patch['id'], users[0]['email'])) _ = api.update( 'patches', patch['id'], [('delegate', users[0]['id'])]) + return users[0].get('email') class Diff(object): @@ -366,16 +367,18 @@ if __name__ == '__main__': print(*maintainer_list, sep='\n') elif command == 'set-pw-delegate': if len(maintainer_list) > 0: - # Get the email of the first maintainer in the list. - try: - delegate = re.match( - r".*\<(?P.*)\>", - maintainer_list[0]).group('email') - except AttributeError: - print("Unexpected format: '{}'".format(maintainer_list[0])) - sys.exit(1) - _git_pw.set_delegate( - patch_list, delegate, - skip_delegated=skip_delegated) + for maintainer in maintainer_list: + # Get the maintainer's email + try: + maintainer_email = re.match( + r".*\<(?P.*)\>", + maintainer).group('email') + except AttributeError: + print("Unexpected format: '{}'".format(maintainer)) + delegate = _git_pw.set_delegate( + patch_list, maintainer_email, + skip_delegated=skip_delegated) + if delegate != None: + break else: print('No maintainers found. Not setting a delegate.') -- 2.25.1