From nobody Sat Apr 20 11:52:15 2024 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=patchew-devel-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1645525431; cv=none; d=zohomail.com; s=zohoarc; b=hvveaGyO0uhj4ZpR89gi6P6+h0URyP5f8U+Vs0LhaRW9R4B/DgW2HKLzUX8fbdEPnPfx7z8KEQHWZl+UF2b/kdocU6ohXiuZ53PWtgR7u5qSfPjCzR86UyUHwfCRhK6I3tCbQAlF4yyCtyiWfe22kIe9gwoHV2Rii1pcfFm+BNk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1645525431; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=/YHV6ZkjRalQzbo+KwiJVaT+1nT5pBWYySoelepuB+A=; b=Bk2S0w4aEgdTcj5eFKAKqIUHahZoRzLytQTN+eV78syCcOWCk3Sp3WTwXpxzUXx0UMD9rT7D790R6i3tUlWG9Tti7eaYr4BTle1BA3IUkUJ3b0MaFpEYKkplzyVRqUPRlPJqbYlodnbCkTR0jrRcjqO7kAVmGTHYD1/ST3pQJB4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 16455254314871017.3222001219603; Tue, 22 Feb 2022 02:23:51 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-461-WognST9ANC61xV4lTK8PZA-1; Tue, 22 Feb 2022 05:23:48 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C5B4C108088C; Tue, 22 Feb 2022 10:23:47 +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 BD13F105C885; Tue, 22 Feb 2022 10:23:47 +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 B2E9C1809CB2; Tue, 22 Feb 2022 10:23:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 21MALTex017270 for ; Tue, 22 Feb 2022 05:21:29 -0500 Received: by smtp.corp.redhat.com (Postfix) id 176867A3EE; Tue, 22 Feb 2022 10:21:29 +0000 (UTC) Received: from avogadro.lan (unknown [10.39.195.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7B8BF78A8D for ; Tue, 22 Feb 2022 10:21:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645525432; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=/YHV6ZkjRalQzbo+KwiJVaT+1nT5pBWYySoelepuB+A=; b=XlzZWwSv/B+orV+7P+mH9MXn03tym6xTUFpxbKUyzZs4YFXnoNl8cBloqULh6+ZZ3YlNvC MDTtuaX9nTXdmcRgkIfQX7BNOfvwDvErbUEAX0hxWav2GmXiL1LT+oqJxT2MMqhy6Cb3iL uj+LskOGrWNfT7YSzdP/OacjVYvq5i4= X-MC-Unique: WognST9ANC61xV4lTK8PZA-1 From: Paolo Bonzini To: patchew-devel@redhat.com Date: Tue, 22 Feb 2022 11:21:25 +0100 Message-Id: <20220222102126.166482-2-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH] maintainer: update watched list on reviewed and merged events 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: , Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=patchew-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: fail (Signature date is -1 seconds in the future.) X-ZM-MESSAGEID: 1645525459170100002 Content-Type: text/plain; charset="utf-8" --- mods/maintainer.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/mods/maintainer.py b/mods/maintainer.py index e74b559..8e05a9c 100644 --- a/mods/maintainer.py +++ b/mods/maintainer.py @@ -27,6 +27,8 @@ class MaintainerModule(PatchewModule): =20 def __init__(self): register_handler("ResultUpdate", self.on_result_update) + register_handler("SeriesMerged", self.on_series_merged) + register_handler("SeriesReviewed", self.on_series_reviewed) declare_event( "MessageQueued", message=3D"Message added", @@ -75,6 +77,21 @@ class MaintainerModule(PatchewModule): # maintainers so redo the watched queue self._update_watch_queue(obj) =20 + def on_series_reviewed(self, evt, series): + # Handle changes to "is:reviewed" + self._update_watch_queue(obj) + + def on_series_merged(self, evt, project, series): + # This is a bit of a hack for now. We probably should hide merged + # series more aggressively, but I am not sure how to handle that + # efficiently in the database. + query =3D QueuedSeries.objects.filter( + message=3Dseries, name__in=3D['accept', 'reject'] + ) + self._drop_all_from_queue(query) + # Handle changes to "is:merged" + self._update_watch_queue(obj) + def _update_review_state(self, request, message_id, accept): if not request.user.is_authenticated: return HttpResponseForbidden() --=20 2.34.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://listman.redhat.com/mailman/listinfo/patchew-devel