From nobody Tue May 13 20:09:38 2025 Delivered-To: importer2@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; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1542766229112332.59415375475317; Tue, 20 Nov 2018 18:10:29 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 62A915AFF5; Wed, 21 Nov 2018 02:10:28 +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 524735885A; Wed, 21 Nov 2018 02:10:28 +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 47C86181B9E1; Wed, 21 Nov 2018 02:10:28 +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 wAL2AQkw006211 for ; Tue, 20 Nov 2018 21:10:27 -0500 Received: by smtp.corp.redhat.com (Postfix) id EBA606607E; Wed, 21 Nov 2018 02:10:26 +0000 (UTC) Received: from magic.redhat.com (ovpn-12-78.pek2.redhat.com [10.72.12.78]) by smtp.corp.redhat.com (Postfix) with ESMTP id D6B6166079; Wed, 21 Nov 2018 02:10:22 +0000 (UTC) From: Fam Zheng To: patchew-devel@redhat.com Date: Wed, 21 Nov 2018 10:08:45 +0800 Message-Id: <20181121020846.7875-16-famz@redhat.com> In-Reply-To: <20181121020846.7875-1-famz@redhat.com> References: <20181121020846.7875-1-famz@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: patchew-devel@redhat.com Cc: ymankad@redhat.com, armbru@redhat.com Subject: [Patchew-devel] [PATCH 15/16] 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 21 Nov 2018 02:10:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" 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 0be435f..9ab6e0b 100644 --- a/api/search.py +++ b/api/search.py @@ -110,6 +110,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: @@ -303,6 +313,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._make_filter_keywords(term) --=20 2.17.2 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel