From nobody Thu Apr 25 13:02:34 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=pass; 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=1645811000; cv=none; d=zohomail.com; s=zohoarc; b=WjboDnaHjh5jmhwC3UqTbgG/YmSJn6Pv9G6AQdzY+k69GnwOc+ECm5usTJzM0Mz1qun8WNCQM9Dv/rhFy0pGgcbq17hmmSyBzfRkLMy5URbuUZVU7fqvpbFU4+PjhXWsuN6OSNljybE9HCHOlm1AlEQRzdOgoS3TBa5XjDeZNp8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1645811000; 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=n8Zy070ib7dgFnjixBk7kZj1w7AV2pSHSjpiJYLj/fg=; b=GQ1BPst25vfC2RZ8hYIKeVBvyui9TAk2ejITGjNW+GYEqEEzlLYpCYkO5Z2RvHR/F7sKPR/9NpFwgYdPr/kkd+z/CsHgFacJR8teb4v6FVRomCysJ46f06vpZBExLWsbouemMreyfwHxa2TXoEbhazrIDnRRtVbYs4hzSq1oS8Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 1645811000652800.9979963028289; Fri, 25 Feb 2022 09:43:20 -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-417-LHwwYxE3O4G7IHy8C36FOw-1; Fri, 25 Feb 2022 12:43:16 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A35971854E2E; Fri, 25 Feb 2022 17:43:15 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9AD572B4AF; Fri, 25 Feb 2022 17:43:15 +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 4D0B34BB40; Fri, 25 Feb 2022 17:43:15 +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 21PHhDGj002322 for ; Fri, 25 Feb 2022 12:43:13 -0500 Received: by smtp.corp.redhat.com (Postfix) id D3B2A87540; Fri, 25 Feb 2022 17:43:13 +0000 (UTC) Received: from avogadro.lan (unknown [10.39.193.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4A39C8C75C for ; Fri, 25 Feb 2022 17:43:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645810999; 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=n8Zy070ib7dgFnjixBk7kZj1w7AV2pSHSjpiJYLj/fg=; b=RPEpbw/xyx8jGHdaXBLyqHbCLC9vv874iY+I3pR0Ni9RJqDdE9bO/uWAihPQQh0RJ/9OnZ HtRuu0NI+na/wu29RM4j9v6dHdFpIDdSrbP2TFZ0J3GDubyD+Abh7NKMXv9VOkg6Xaa9cB qxQaOGMjWca1WRNhSRKTPSlk9i4XH1g= X-MC-Unique: LHwwYxE3O4G7IHy8C36FOw-1 From: Paolo Bonzini To: patchew-devel@redhat.com Date: Fri, 25 Feb 2022 18:43:05 +0100 Message-Id: <20220225174305.612960-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH] git: expose push options in the series/unapplied endpoint 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.23 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: pass (identity @redhat.com) X-ZM-MESSAGEID: 1645811002668100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- mods/git.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mods/git.py b/mods/git.py index b1c4e14..50a1b39 100644 --- a/mods/git.py +++ b/mods/git.py @@ -358,10 +358,17 @@ class ApplierGetView(APILoginRequiredView): class UnappliedSeriesSerializer(SeriesSerializer): class Meta: model =3D Message - fields =3D SeriesSerializer.Meta.fields + ("mirror", "result_uri") + fields =3D SeriesSerializer.Meta.fields + ("mirror", "result_uri",= "push_options") =20 mirror =3D SerializerMethodField() result_uri =3D SerializerMethodField() + push_options =3D SerializerMethodField() + + def get_push_options(self, obj): + if obj.project.config.get("git", {}).get("use_git_push_option", Fa= lse): + return obj.git_result.data.get("git.push_options") + else: + return None =20 def get_result_uri(self, obj): request =3D self.context["request"] --=20 2.34.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://listman.redhat.com/mailman/listinfo/patchew-devel