From nobody Mon Sep 16 19:23:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=patchew-devel-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail header.i=fam@euphon.net; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1543415786562613.1112421587843; Wed, 28 Nov 2018 06:36:26 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 429ABA403B; Wed, 28 Nov 2018 14:36:25 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2F144611CA; Wed, 28 Nov 2018 14:36:25 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 1CA6D181B9E5; Wed, 28 Nov 2018 14:36:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wASEaNwB032126 for ; Wed, 28 Nov 2018 09:36:23 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2BF867A5D7; Wed, 28 Nov 2018 14:36:23 +0000 (UTC) Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 18082611CA; Wed, 28 Nov 2018 14:36:23 +0000 (UTC) Received: from sender1.zoho.com.cn (sender2-op-o12.zoho.com.cn [163.53.93.243]) by mx1.redhat.com (Postfix) with ESMTP id 4228AA0490; Wed, 28 Nov 2018 14:36:20 +0000 (UTC) Received: from localhost.localdomain (123.112.65.99 [123.112.65.99]) by mx.zoho.com.cn with SMTPS id 1543415770065619.8965436583757; Wed, 28 Nov 2018 22:36:10 +0800 (CST) ARC-Seal: i=1; a=rsa-sha256; t=1543415776; cv=none; d=zoho.com.cn; s=zohoarc; b=DmgxhmLIG8YvvF0ivZIaLajW3YMWCBdiyvBmqfhPP7YbKB1aRbZL2qdQ88cFPv7QqeWqjDPtz0wAg7zF22eXXgkZBdnAd6UvimguI70E20XHMMLIaTP2ZuGcVmDHmSL2gZhrU1HIc2pVVFYk069QihjzPhoajfkxh4v3aEBe2ko= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com.cn; s=zohoarc; t=1543415776; h=Cc:Date:From:In-Reply-To:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=V6LaiELg/jfjcYjDBV+PFMrZ7DG1ZU9/OEJNn0h80p8=; b=RJtzoiEoVLPH+NsUTiMnfJAZxuj/XZp+XIeIMuEpUfgrV4uup2YpYdimiVTOXLf5uNKj/sy3ZP46OuoorEB3sxNnPUGSgek9dOqQIzAqLEDGQRxmKILTTNcgIjHsBUTVFjtUiS0rvjxLr1gyJ9UuGJDdAP5JYWdzLpiM61YhfXU= ARC-Authentication-Results: i=1; mx.zoho.com.cn; dkim=pass header.i=euphon.net; spf=pass smtp.mailfrom=fam@euphon.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1543415776; s=zoho; d=euphon.net; i=fam@euphon.net; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; l=1109; bh=V6LaiELg/jfjcYjDBV+PFMrZ7DG1ZU9/OEJNn0h80p8=; b=c/nBrkQ82JmTsnt9j6yXYhMCq64qpmrjfhPC0WJQz2Xxho5KD8lIG5MXiSJUjpf2 BnwUxpxLlen9q96pWXxzvLW4tA+ESt8VxGAuCCAjT46Yn5z9rtf0+Cg8cD6oYu2pjK9 VstE1v90aQg+1x5bwQOHJATl/rI4CuIHJsxYzvng= From: Fam Zheng To: patchew-devel@redhat.com Date: Wed, 28 Nov 2018 22:35:04 +0800 Message-Id: <20181128143505.27730-12-fam@euphon.net> In-Reply-To: <20181128143505.27730-1-fam@euphon.net> References: <20181128143505.27730-1-fam@euphon.net> X-ZohoCNMailClient: External X-Greylist: Sender passed SPF test, ACL 238 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 28 Nov 2018 14:36:22 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 28 Nov 2018 14:36:22 +0000 (UTC) for IP:'163.53.93.243' DOMAIN:'sender2-op-o12.zoho.com.cn' HELO:'sender1.zoho.com.cn' FROM:'fam@euphon.net' RCPT:'' X-RedHat-Spam-Score: -0.101 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_PASS) 163.53.93.243 sender2-op-o12.zoho.com.cn 163.53.93.243 sender2-op-o12.zoho.com.cn X-Scanned-By: MIMEDefang 2.78 on 10.5.110.28 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: patchew-devel@redhat.com Cc: Fam Zheng Subject: [Patchew-devel] [PATCH v2 11/12] search: Introduce maintained-by:NAME term X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 28 Nov 2018 14:36:25 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Fam Zheng Signed-off-by: Fam Zheng --- api/search.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/api/search.py b/api/search.py index a15d238..264c1cd 100644 --- a/api/search.py +++ b/api/search.py @@ -127,6 +127,16 @@ Compare the address info of message. Example: =20 --- =20 +### Search by maintainer associated with the changeset + + - Syntax: maintained-by:NAME + - Syntax: maint:NAME + +NAME can be the name, email or a substring of MAINTAINERS file entries of = the +maintainer. + +--- + ### Search by result =20 Syntax: @@ -321,6 +331,11 @@ Search text keyword in the email message. Example: cond =3D term[term.find(":") + 1:] self._projects.add(cond) return Q(project__name=3Dcond) | Q(project__parent_project__na= me=3Dcond) + elif term.startswith("maintained-by:") or term.startswith("maint:"= ): + cond =3D term[term.find(":") + 1:] + if cond =3D=3D "me" and user: + cond =3D user.email + return Q(maintainers__icontains=3Dcond) =20 # Keyword in subject is the default return self._add_to_keywords(term) --=20 2.17.2 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel