From nobody Mon Feb 9 04:59:35 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+52889+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+52889+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1578306951; cv=none; d=zohomail.com; s=zohoarc; b=PFIFbJsKcKMJtrDT8YIYkk8GECML3MWCc3w0Vwqz+ehKmeeLchkP4WiTAmekWHBOtu/9IIuow/PVsfMOVkUScPuI+clnzF4u5mY3PZRSQ8LSwFUwNbJcjEz9gWRy+2PlsUf5fkZ4CofP8De4oY7zHVPuxNxkonXn+JCT/BU53zU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578306951; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=WdqTugBozZRbkCvDvNWXDrAJZI0wDaNsXtPblhBdCFY=; b=KVE0XYkkXBPdpwp+6JmKYFaMAQXKOs22ZPe6tJiL+uzugBV16/ajjReR95RDpc5S+VbydgOE7jQn7G2W91ynRVBTp10ae1m0kVQj8HeHSVLZ57Nix+BW6z7NaUuN0nCURLxw2ggsOX6R2PMTjNvaHpOT9YBstGaPzlEle/NhJPI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+52889+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1578306951863182.40288200681834; Mon, 6 Jan 2020 02:35:51 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id T7ECYY1788612xrKb35caAei; Mon, 06 Jan 2020 02:35:51 -0800 X-Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.61]) by mx.groups.io with SMTP id smtpd.web11.2068.1578306950637382217 for ; Mon, 06 Jan 2020 02:35:50 -0800 X-Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-162-aqGmy-_NNxefC0DAH9ubVw-1; Mon, 06 Jan 2020 05:35:48 -0500 X-Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8B419107ACE3; Mon, 6 Jan 2020 10:35:47 +0000 (UTC) X-Received: from x1w.redhat.com (ovpn-204-53.brq.redhat.com [10.40.204.53]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 13F805D9E1; Mon, 6 Jan 2020 10:35:44 +0000 (UTC) From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= To: devel@edk2.groups.io Cc: Michael D Kinney , Laszlo Ersek , Philippe Mathieu-Daude , Liming Gao , Jordan Justen Subject: [edk2-devel] [PATCH v2 4/4] BaseTools/PatchCheck.py: Check the committer email address Date: Mon, 6 Jan 2020 11:35:28 +0100 Message-Id: <20200106103528.5438-5-philmd@redhat.com> In-Reply-To: <20200106103528.5438-1-philmd@redhat.com> References: <20200106103528.5438-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: aqGmy-_NNxefC0DAH9ubVw-1 X-Mimecast-Spam-Score: 0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,philmd@redhat.com X-Gm-Message-State: uFRViWqMyfqnrpHbR7eIt7Bqx1787277AA= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1578306951; bh=vlkFNRyudc0Y6JaXoc8+UyADaLuNjsoyNTYnzjOrfZo=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=lpe6MenqccwtwHPkYZADPYEj6VKEBL9JnnkA/7ZjKct7rYgJzi9ta+Ypun+3ZBqqifX e/gauB7FeYErgNg8uOJJeRfpFLGet7ODFIghn4rVnu0e29XyiEaUpYRgOEky29iVEzmAo glvdI/O3vFtJ8Dq7kp5XnJYQtlkGV0YzjS4= X-ZohoMail-DKIM: pass (identity @groups.io) To avoid patches committed with incorrect email address, use the EmailAddressCheck class on the committer email too. Cc: Liming Gao Cc: Jordan Justen Signed-off-by: Philippe Mathieu-Daude --- v2: Do not use "" because we use subprocess.Popen (Jordan Justen) --- BaseTools/Scripts/PatchCheck.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck= .py index f0e661bfd6e3..c5f2f89e4d4c 100755 --- a/BaseTools/Scripts/PatchCheck.py +++ b/BaseTools/Scripts/PatchCheck.py @@ -560,6 +560,8 @@ class CheckGitCommits: else: blank_line =3D True print('Checking git commit:', commit) + email =3D self.read_committer_email_address_from_git(commit) + self.ok &=3D EmailAddressCheck(email, 'Committer').ok patch =3D self.read_patch_from_git(commit) self.ok &=3D CheckOnePatch(commit, patch).ok if not commits: @@ -578,6 +580,10 @@ class CheckGitCommits: # Run git to get the commit patch return self.run_git('show', '--pretty=3Demail', '--no-textconv', c= ommit) =20 + def read_committer_email_address_from_git(self, commit): + # Run git to get the committer email + return self.run_git('show', '--pretty=3D%cn <%ce>', '--no-patch', = commit) + def run_git(self, *args): cmd =3D [ 'git' ] cmd +=3D args --=20 2.21.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#52889): https://edk2.groups.io/g/devel/message/52889 Mute This Topic: https://groups.io/mt/69462077/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-