From nobody Mon Feb 9 23:38:37 2026 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; 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 15325696659084.301102936055827; Wed, 25 Jul 2018 18:47:45 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 1F682308A96C; Thu, 26 Jul 2018 01:47:45 +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 10F2B5DF50; Thu, 26 Jul 2018 01:47:45 +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 F228218037EC; Thu, 26 Jul 2018 01:47:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6Q1lhZh015054 for ; Wed, 25 Jul 2018 21:47:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8143C202704B; Thu, 26 Jul 2018 01:47:43 +0000 (UTC) Received: from lemon.usersys.redhat.com (ovpn-12-77.pek2.redhat.com [10.72.12.77]) by smtp.corp.redhat.com (Postfix) with ESMTP id EF1352026D68; Thu, 26 Jul 2018 01:47:41 +0000 (UTC) From: Fam Zheng To: patchew-devel@redhat.com Date: Thu, 26 Jul 2018 09:47:20 +0800 Message-Id: <20180726014725.13677-6-famz@redhat.com> In-Reply-To: <20180726014725.13677-1-famz@redhat.com> References: <20180726014725.13677-1-famz@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 05/10] git: Emit git result update event 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Thu, 26 Jul 2018 01:47:45 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" old_status will help testing mod to determine if recalculating test results is necessary. Signed-off-by: Fam Zheng --- mods/git.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/mods/git.py b/mods/git.py index 924547a..7970bc1 100644 --- a/mods/git.py +++ b/mods/git.py @@ -67,7 +67,9 @@ class GitModule(PatchewModule): # Make sure git is available subprocess.check_output(["git", "version"]) declare_event("ProjectGitUpdate", project=3D"the updated project n= ame") - declare_event("SeriesApplied", series=3D"the object of applied ser= ies") + declare_event("GitResultUpdate", obj=3D"the updated object", + old_status=3D'the old result status', + result=3D"the Git result object") register_handler("SeriesComplete", self.on_series_update) register_handler("TagsUpdate", self.on_series_update) =20 @@ -273,8 +275,10 @@ class ApplierReportView(APILoginRequiredView): def handle(self, request, project, message_id, tag, url, base, repo, failed, log): p =3D Project.objects.get(name=3Dproject) - r =3D Message.objects.series_heads().get(project=3Dp, - message_id=3Dmessage_id).gi= t_result + series =3D Message.objects.series_heads().get(project=3Dp, + message_id=3Dmessage_id) + r =3D series.git_result + old_status =3D r.status r.log =3D log data =3D {} if failed: @@ -292,3 +296,5 @@ class ApplierReportView(APILoginRequiredView): r.status =3D Result.SUCCESS r.data =3D data r.save() + emit_event("GitResultUpdate", obj=3Dseries, old_status=3Dold_statu= s, + result=3Dr) --=20 2.17.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel