From patchwork Fri Jun 28 11:43:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mete Polat X-Patchwork-Id: 1124131 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45Zw0V5Nhgz9s3Z for ; Fri, 28 Jun 2019 21:44:26 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="N8lpYzo1"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 45Zw0V3lgFzDqrV for ; Fri, 28 Jun 2019 21:44:26 +1000 (AEST) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2a00:1450:4864:20::42c; helo=mail-wr1-x42c.google.com; envelope-from=metepolat2000@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="N8lpYzo1"; dkim-atps=neutral Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 45Zw01254gzDqlw for ; Fri, 28 Jun 2019 21:43:57 +1000 (AEST) Received: by mail-wr1-x42c.google.com with SMTP id f9so5922557wre.12 for ; Fri, 28 Jun 2019 04:43:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ds3xPiCa3YWZElvHRfvk47A9Ta1JIGFMh3QUf19GP8U=; b=N8lpYzo1nVe9xIGjs0XaM7AikJaa8bh4FmmcysEnnjlTtXDUKs9sZLtd6/65ZkSm/9 Y47XANCBfRrUpHjyY4GhcI3YynLTdX4Rcbg2xC+H1MBddqX5C9VHO+jE18JeRNfvrh6m 5KeGhG2fKp94YRTCwHT/LmFnFbOVSuho2ZN1j1vCgGgUSd33nwsj/K7nxQ2KiT8W8YMt 8IaOW84hlk+SPkGgV91bbBeteppgq6f6D+huGB+QLO5FlVUwMkgQH27CsscpcEvbLNGk 7IMuc7FYls3E5TO4d2up3+Kda8NRQa5LbelbIWTS7gIeaz22Nih4aVrkW1WuDo1/xTty Bnwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ds3xPiCa3YWZElvHRfvk47A9Ta1JIGFMh3QUf19GP8U=; b=K5lOKE4YJEHoELPmWhEDRTsnGdITfKogg3ONzlEPToPVsL2IfoVibNA0kmoGJ2/q4M QpJ+xj9B9bvozgY55Pl58ish68+8BGUKGFB9MunA2dhMIKv2V2sw/PXXN479IoDrijCi O/krCFpxqgYzzka/fU5a6EwC8fFT489yAF0DGK8vY4KpaOU9snwDDvfiLlND2h/+W4Sd pqXoBbfJum2TXmXfboBXg9uhLNNbuY/ljyOSpWLD0lzg+Xq0oP/QsUBSng3jdGBOO2J8 RDNFfuLyg1Gy7SInpsZ51FpLyzKXwld0MnT5tQBSJYnQHRf6S8A1jKS/AtYunpYGwkNe Gk0w== X-Gm-Message-State: APjAAAX60TxPelao7aImZEznhG8Ir3XlDgCmTe1PeAqYQJP1tKVG4Qok BtLMbhbeoOVXPyXPOJJ6ALaZrszScCVyDw== X-Google-Smtp-Source: APXvYqwhsbO7OdrjzjAwBFZYF2n1e8EjrJDL4efh3Ctvi5mQXPe3C3a3F3teuvtli3eCOm8K1Lf1bA== X-Received: by 2002:adf:82ca:: with SMTP id 68mr7487286wrc.250.1561722234232; Fri, 28 Jun 2019 04:43:54 -0700 (PDT) Received: from localhost.localdomain ([193.23.33.53]) by smtp.gmail.com with ESMTPSA id q12sm3258127wrp.50.2019.06.28.04.43.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Jun 2019 04:43:53 -0700 (PDT) From: Mete Polat To: patchwork@lists.ozlabs.org Subject: [PATCH 1/5] Add option to get all project patches in one mbox Date: Fri, 28 Jun 2019 13:43:10 +0200 Message-Id: <20190628114314.10462-2-metepolat2000@gmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190628114314.10462-1-metepolat2000@gmail.com> References: <20190628114314.10462-1-metepolat2000@gmail.com> MIME-Version: 1.0 X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lukas.bulwahn@gmail.com Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" FilenameMixin.filename(self) returns a sanitized filename based on the str representation of the object. In our case str(project) returns the project name. Thus the output file will be .mbox Signed-off-by: Mete Polat --- patch_list_mbox() and project_patches_to_mbox() are not named project_mbox() and project_to_mbox() in order to prevent confusion. While a project also consists of cover letters, those are not intended to be included. patchwork/models.py | 22 +++++++++++----------- patchwork/views/patch.py | 12 ++++++++++++ patchwork/views/utils.py | 13 +++++++++++++ 3 files changed, 36 insertions(+), 11 deletions(-) diff --git a/patchwork/models.py b/patchwork/models.py index a7eee4d..36d6fad 100644 --- a/patchwork/models.py +++ b/patchwork/models.py @@ -55,8 +55,18 @@ class Person(models.Model): verbose_name_plural = 'People' +class FilenameMixin(object): + + @property + def filename(self): + """Return a sanitized filename without extension.""" + fname_re = re.compile(r'[^-_A-Za-z0-9\.]+') + fname = fname_re.sub('-', str(self)).strip('-') + return fname + + @python_2_unicode_compatible -class Project(models.Model): +class Project(FilenameMixin, models.Model): # properties linkname = models.CharField(max_length=255, unique=True) @@ -337,16 +347,6 @@ class EmailMixin(models.Model): abstract = True -class FilenameMixin(object): - - @property - def filename(self): - """Return a sanitized filename without extension.""" - fname_re = re.compile(r'[^-_A-Za-z0-9\.]+') - fname = fname_re.sub('-', str(self)).strip('-') - return fname - - @python_2_unicode_compatible class Submission(FilenameMixin, EmailMixin, models.Model): # parent diff --git a/patchwork/views/patch.py b/patchwork/views/patch.py index 277b281..cf494ad 100644 --- a/patchwork/views/patch.py +++ b/patchwork/views/patch.py @@ -20,6 +20,7 @@ from patchwork.models import Project from patchwork.models import Submission from patchwork.views import generic_list from patchwork.views.utils import patch_to_mbox +from patchwork.views.utils import project_patches_to_mbox from patchwork.views.utils import series_patch_to_mbox @@ -34,6 +35,17 @@ def patch_list(request, project_id): return render(request, 'patchwork/list.html', context) +def patch_list_mbox(request, project_id): + project = get_object_or_404(Project, linkname=project_id) + + response = HttpResponse(content_type='text/plain') + response.write(project_patches_to_mbox(project)) + response['Content-Disposition'] = 'attachment; filename=%s.mbox' % ( + project.filename) + + return response + + def patch_detail(request, patch_id): # redirect to cover letters where necessary try: diff --git a/patchwork/views/utils.py b/patchwork/views/utils.py index 1da1aaa..1461525 100644 --- a/patchwork/views/utils.py +++ b/patchwork/views/utils.py @@ -110,6 +110,19 @@ patch_to_mbox = _submission_to_mbox cover_to_mbox = _submission_to_mbox +def project_patches_to_mbox(project): + """Get an mbox representation of all patches in a project. + + Arguments: + project: The project object to convert. + + Returns: + A string for the mbox file. + """ + patches = Patch.objects.filter(patch_project=project) + return '\n'.join([patch_to_mbox(p) for p in patches]) + + def bundle_to_mbox(bundle): """Get an mbox representation of a bundle. From patchwork Fri Jun 28 11:43:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mete Polat X-Patchwork-Id: 1124134 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45Zw1Q0lyHz9s3Z for ; Fri, 28 Jun 2019 21:45:14 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="gIrN2LPv"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 45Zw1P70wWzDqrZ for ; Fri, 28 Jun 2019 21:45:13 +1000 (AEST) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2a00:1450:4864:20::341; helo=mail-wm1-x341.google.com; envelope-from=metepolat2000@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="gIrN2LPv"; dkim-atps=neutral Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 45Zw023htNzDqlr for ; Fri, 28 Jun 2019 21:43:59 +1000 (AEST) Received: by mail-wm1-x341.google.com with SMTP id v19so8675380wmj.5 for ; Fri, 28 Jun 2019 04:43:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2r6sdhDKTO4wclWARcUMpcr4qSBVWkh0CyxludQbMqQ=; b=gIrN2LPvLen9jYBRa8O3Buy4s9npQmDRUKahc2XoCbVQhlE0wdbkUPAvXrKOZjcfCz RAUP3IgnZFTBvRmXc240ykqd5mWKDwvBuplAr9fKtyHMdlKB4wCqh/b5e9uR+drMDJ6w Bk0EuiAH344WFB15fKunqxg5m4eFmEkPm8HL/wT60QI0FyjCVjRdtP+91V79y5S4E8up l4/QdJaXLGGFdGUK69SQmdZHhn5rQi7iOdxHM6gnWA+/kFlWvIXmLkaz7ww/E59QfIZo e2wUTB0q4PfVK+dYhHp77x+xRzKLJReuMDT5JdY7IUqKLpl46kNr8mJABuRSbPRnP/pW A8Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2r6sdhDKTO4wclWARcUMpcr4qSBVWkh0CyxludQbMqQ=; b=dv0ia3DO3NyFIu0oCXYrsU7V9ep8nSknzfwVDYjuHnJT8367taWcsL2dLm2QQz2m4y xJTeWqBfujNdPr3udU0Cbiobu8GR8HrBC5710f8l5Xp2qy3SWk9bfS2zM1halrOsZ7t3 bl8zNzsx7Df3UTlMNVHNZjBXw1Paza3w35VJPwGxz4kwCLIsjpO1Ip7nfsizsulDmewn zksxO25SDfYv0LWELTM9D6E6+S4io5fS8gF3PORxi2QVJsIW6R4vAA4w2gntY3FcMA0A +vugt4kTQdqOIPgYD6XjcQ+A1NBCp/auBaeyTbfn1u9+G0fb7ZqlRhkKkIdTczmB4I3o pF9w== X-Gm-Message-State: APjAAAWRChQE9r8kbN8fcJmTuHPjnpbvH93rhnEqzSpHioR1Myz1ewC9 GzkdvcPFv54QV0ApiErIsBYw7RiOrCN9Tg== X-Google-Smtp-Source: APXvYqxJ8YFeVnMvq1tpsu8s6x7nD9HaXBh++Ta1uMCOogGyDMW2Vp59ZQLW+9oqoGYzBlmz3ZlKBQ== X-Received: by 2002:a1c:6545:: with SMTP id z66mr6871047wmb.77.1561722235553; Fri, 28 Jun 2019 04:43:55 -0700 (PDT) Received: from localhost.localdomain ([193.23.33.53]) by smtp.gmail.com with ESMTPSA id q12sm3258127wrp.50.2019.06.28.04.43.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Jun 2019 04:43:55 -0700 (PDT) From: Mete Polat To: patchwork@lists.ozlabs.org Subject: [PATCH 2/5] Add url to get all project patches in one mbox Date: Fri, 28 Jun 2019 13:43:11 +0200 Message-Id: <20190628114314.10462-3-metepolat2000@gmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190628114314.10462-1-metepolat2000@gmail.com> References: <20190628114314.10462-1-metepolat2000@gmail.com> MIME-Version: 1.0 X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lukas.bulwahn@gmail.com Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" New url: project//list/mbox/ Signed-off-by: Mete Polat --- 'patch-list-mbox' is not named 'project-mbox' in order to prevent confusion. While a project also consists of cover letters, those are not intended to be included. patchwork/urls.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/patchwork/urls.py b/patchwork/urls.py index 935e25f..9e9f7f3 100644 --- a/patchwork/urls.py +++ b/patchwork/urls.py @@ -32,6 +32,8 @@ urlpatterns = [ url(r'^$', project_views.project_list, name='project-list'), url(r'^project/(?P[^/]+)/list/$', patch_views.patch_list, name='patch-list'), + url(r'^project/(?P[^/]+)/list/mbox/$', + patch_views.patch_list_mbox, name='patch-list-mbox'), url(r'^project/(?P[^/]+)/bundles/$', bundle_views.bundle_list, name='bundle-list'), url(r'^project/(?P[^/]+)/$', project_views.project_detail, From patchwork Fri Jun 28 11:43:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mete Polat X-Patchwork-Id: 1124133 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45Zw124hslz9s3Z for ; Fri, 28 Jun 2019 21:44:54 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="pbEcXxen"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 45Zw123k6JzDqnv for ; Fri, 28 Jun 2019 21:44:54 +1000 (AEST) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2a00:1450:4864:20::341; helo=mail-wm1-x341.google.com; envelope-from=metepolat2000@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="pbEcXxen"; dkim-atps=neutral Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 45Zw024cK9zDqlw for ; Fri, 28 Jun 2019 21:43:59 +1000 (AEST) Received: by mail-wm1-x341.google.com with SMTP id c6so8705115wml.0 for ; Fri, 28 Jun 2019 04:43:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cVT/ygITd6i13GiJB3BJEbImVggPSXNjDWzjWTYTB/M=; b=pbEcXxenRJDH7M2N1ETfKZrLEWLZX9Neh5KcqdzwaCrR/Qi/+/j+pe8Rh22gYxYTl9 LHr9+HFimVH+1phLlmg9FEFuvg8PCU2sW2dZnDY3Gm2eMMF33EugzgM6SEk3GVgEeXW4 l8ScOpnp1Q1jhqxr7qa0A8vWoB9wGowAUSR0axbJYs2+fQCW3B86WXYDHRdAy6+wI+ln RxazSUI68eYfd5aGptjJag7wsq7cwrUOASgCXFK4VCmvtZuGjhY6SqixrsUwUklAs8Z6 KJA4roguSWyQC4J0VT6h/4jZLjKnqeZ/dcJHc5UtiBaC0FkEeH+n/PtXk12QydOyqBby LHvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cVT/ygITd6i13GiJB3BJEbImVggPSXNjDWzjWTYTB/M=; b=Uu1TyDrHMwOZbgeGu6i1nSaZqOglnjPz86/eHhBJ73+/Eq3bqyMyRwvZ95u4yi8PPL qIl7Dg8b0aplw2wf2+yT6BMMkbyPy8R62shDmjfshmAbnuxVrrliz4VXGiDdfAWIoWJI YmG3P96bqFcjNx3TExg25x4vj4D3WoBKUyvrT1Flb0nzaCEWlyWLq4izNBPCyke+SgpM EcTj/+icHN2cnCwk7VlZvOzlTwG0hKh/62VIcgNe64iwCySKrhg9UYnxHLiRzeCvpGFa Ptc2+i2CAdt32JHHQ6Bhb58O329uGmXRHk+cSvJU1uTwCrKQnGMUWDTJCC/uZS7H5m+l 545Q== X-Gm-Message-State: APjAAAWI4sr7KcGJdt6HVCCjmSsxb3mZi4e6pvjGxR+7kqvuOUmjJsWb L7PsdfYsmIGpExPqXUHcIAWJbwA1PV9Dcw== X-Google-Smtp-Source: APXvYqxFvGY9MDd+hDJURJm5P8Jjy+VlKncl+58FiSIK7mFn0aZnkkvDxgfH+tXJFs1GjFR04223Pw== X-Received: by 2002:a1c:c74a:: with SMTP id x71mr7040933wmf.121.1561722236443; Fri, 28 Jun 2019 04:43:56 -0700 (PDT) Received: from localhost.localdomain ([193.23.33.53]) by smtp.gmail.com with ESMTPSA id q12sm3258127wrp.50.2019.06.28.04.43.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Jun 2019 04:43:55 -0700 (PDT) From: Mete Polat To: patchwork@lists.ozlabs.org Subject: [PATCH 3/5] Add api endpoint for project patches as mbox Date: Fri, 28 Jun 2019 13:43:12 +0200 Message-Id: <20190628114314.10462-4-metepolat2000@gmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190628114314.10462-1-metepolat2000@gmail.com> References: <20190628114314.10462-1-metepolat2000@gmail.com> MIME-Version: 1.0 X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lukas.bulwahn@gmail.com Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" Introduces a new field in the project endpoint called 'patches_mbox'. Signed-off-by: Mete Polat --- Again 'patches_mbox' and not 'mbox' in order to prevent confusion. patchwork/api/project.py | 11 +++++++++-- patchwork/models.py | 3 +++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/patchwork/api/project.py b/patchwork/api/project.py index d7bb1f2..1f8862d 100644 --- a/patchwork/api/project.py +++ b/patchwork/api/project.py @@ -4,6 +4,7 @@ # SPDX-License-Identifier: GPL-2.0-or-later from django.shortcuts import get_object_or_404 +from rest_framework.fields import SerializerMethodField from rest_framework.generics import ListAPIView from rest_framework.generics import RetrieveUpdateAPIView from rest_framework.serializers import CharField @@ -21,16 +22,22 @@ class ProjectSerializer(BaseHyperlinkedModelSerializer): list_email = CharField(max_length=200, source='listemail', read_only=True) maintainers = UserProfileSerializer(many=True, read_only=True, source='maintainer_project') + patches_mbox = SerializerMethodField() + + def get_patches_mbox(self, instance): + request = self.context.get('request') + return request.build_absolute_uri(instance.get_mbox_url()) class Meta: model = Project fields = ('id', 'url', 'name', 'link_name', 'list_id', 'list_email', 'web_url', 'scm_url', 'webscm_url', 'maintainers', - 'subject_match') + 'subject_match', 'patches_mbox') read_only_fields = ('name', 'link_name', 'list_id', 'list_email', - 'maintainers', 'subject_match') + 'maintainers', 'subject_match', 'patches_mbox') versioned_fields = { '1.1': ('subject_match', ), + '1.2': ('patches_mbox', ), } extra_kwargs = { 'url': {'view_name': 'api-project-detail'}, diff --git a/patchwork/models.py b/patchwork/models.py index 36d6fad..770f572 100644 --- a/patchwork/models.py +++ b/patchwork/models.py @@ -104,6 +104,9 @@ class Project(FilenameMixin, models.Model): return [] return list(Tag.objects.all()) + def get_mbox_url(self): + return reverse('patch-list-mbox', kwargs={'project_id': self.linkname}) + def __str__(self): return self.name From patchwork Fri Jun 28 11:43:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mete Polat X-Patchwork-Id: 1143786 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 463vWn5XQHz9sDB for ; Thu, 8 Aug 2019 13:49:41 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="CSoz04W7"; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 463vWn0z6jzDqQb for ; Thu, 8 Aug 2019 13:49:41 +1000 (AEST) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2a00:1450:4864:20::32f; helo=mail-wm1-x32f.google.com; envelope-from=metepolat2000@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="CSoz04W7"; dkim-atps=neutral Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 45Zw021hNpzDqmC for ; Fri, 28 Jun 2019 21:44:01 +1000 (AEST) Received: by mail-wm1-x32f.google.com with SMTP id 207so8798817wma.1 for ; Fri, 28 Jun 2019 04:44:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cmooHLLedu3POlYX2C5BGF7UyWR8nOBuVnLNb9h43/A=; b=CSoz04W7wJS5Xk93Tb3a4AdHxnBxYWQvMsRKM2fh2BdnFMMP9rFp3EcsmvwXr8g/mT yFx+c8QFfhV0sqho1W//aXIXRvWQp4F781cR2dKvrwsO+3GHz+zDhUs3qIC4lWbeQoP4 67ukfTnZMLOVl6r1Az+l3ti2puQJnLDttWuE2UWq0J1CofwIjtwYZA397kEHDzEg5FBz hWvNutkC8ET1/QL60NiOerhaJvhazEJ/wSCNGz8ZhAf6cmce0WqboxcLIIbGuPgM6KDu sWevD82UZeCzgZGjtzUy6ZnbLejtwX+RyqUFiCeh4Cu5dOp/EJQdxlClzsTxiISFs/XW 5a/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cmooHLLedu3POlYX2C5BGF7UyWR8nOBuVnLNb9h43/A=; b=ePPpnUJTRb5M5Wxu/Vof1pKsdXwqbwulyftPImP48xk9nfFtIKcmfl3HiNmLmEqeqM wnCQK/OWR14LsAlZ3D+qqdtV41zVg9ho9g11JdWVkMfeJgo87A3IynnQwgfFjJYq4pyH V670IDinv11/5NQiHRwWsUMQgpP97jVb+2rap+VkHp0KFtyWVRCz/9aUJhzFWTM7SMcl DYsFmn+XXmpdO7YljCNFCmdjukAZCLghDXNwK0GDdXnD/g0tiYQhSendjYc0O0GBGg2z mnvDnyFVcFn8am+XBAKd2RVAHO4az7PisD902kUmeTWi6B2Ke0da44FJY4iHC1JSU4jS bnvw== X-Gm-Message-State: APjAAAWsE0/gzJyDa5BlfjBoebxoxRQfLyL/xoPrbASl6NwBWNeYDher PGon7CXWAZp9AntpK/KtEZGsVTnsj2e0Sw== X-Google-Smtp-Source: APXvYqwcCY5On9gNf4GPPpAGjsHQQYhaSiH+TBxgXDRHdx/rM73c3VFbi5sB4bfcAqQCiHV6dkrsNw== X-Received: by 2002:a05:600c:118a:: with SMTP id i10mr6848019wmf.162.1561722237588; Fri, 28 Jun 2019 04:43:57 -0700 (PDT) Received: from localhost.localdomain ([193.23.33.53]) by smtp.gmail.com with ESMTPSA id q12sm3258127wrp.50.2019.06.28.04.43.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Jun 2019 04:43:56 -0700 (PDT) From: Mete Polat To: patchwork@lists.ozlabs.org Subject: [PATCH 4/5] Update api documentation for v1.2 Date: Fri, 28 Jun 2019 13:43:13 +0200 Message-Id: <20190628114314.10462-5-metepolat2000@gmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190628114314.10462-1-metepolat2000@gmail.com> References: <20190628114314.10462-1-metepolat2000@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 08 Aug 2019 13:47:28 +1000 X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" Signed-off-by: Mete Polat --- In the index.rst (section 'supported versions') we have to specify since which patchwork version an api version is available. If this patch will be integrated in a patchwork version other than 2.2, the version number has to be updated here. docs/api/rest/index.rst | 50 +- docs/api/rest/schemas/v1.1.rst | 4 +- docs/api/rest/schemas/v1.2.rst | 5 + docs/api/schemas/generate_schema.py | 4 +- docs/api/schemas/latest/patchwork.yaml | 7 +- docs/api/schemas/patchwork.j2 | 7 + docs/api/schemas/v1.2/patchwork.yaml | 2319 ++++++++++++++++++++++++ 7 files changed, 2370 insertions(+), 26 deletions(-) create mode 100644 docs/api/rest/schemas/v1.2.rst create mode 100644 docs/api/schemas/v1.2/patchwork.yaml diff --git a/docs/api/rest/index.rst b/docs/api/rest/index.rst index 1a094d7..f6b6380 100644 --- a/docs/api/rest/index.rst +++ b/docs/api/rest/index.rst @@ -8,7 +8,7 @@ This guide provides an overview of how one can interact with the REST API. For detailed information on type and response format of the various resources exposed by the API, refer to the web browsable API. This can be found at: - https://patchwork.example.com/api/1.1/ + https://patchwork.example.com/api/1.2/ where `patchwork.example.com` refers to the URL of your Patchwork instance. @@ -33,6 +33,12 @@ If all you want is reference guides, skip straight to :ref:`rest-api-schemas`. The API version was bumped to v1.1 in Patchwork v2.1. The older v1.0 API is still supported. For more information, refer to :ref:`rest-api-versions`. +.. versionchanged:: 2.2 + + The API version was bumped to v1.2 in Patchwork v2.2. The older v1.0 and v1.1 + APIs are still supported. For more information, refer to + :ref:`rest-api-versions`. + Getting Started --------------- @@ -47,16 +53,16 @@ Patchwork instance hosted at `patchwork.example.com`, run: .. code-block:: shell - $ curl -s 'https://patchwork.example.com/api/1.1/' | python -m json.tool + $ curl -s 'https://patchwork.example.com/api/1.2/' | python -m json.tool { - "bundles": "https://patchwork.example.com/api/1.1/bundles/", - "covers": "https://patchwork.example.com/api/1.1/covers/", - "events": "https://patchwork.example.com/api/1.1/events/", - "patches": "https://patchwork.example.com/api/1.1/patches/", - "people": "https://patchwork.example.com/api/1.1/people/", - "projects": "https://patchwork.example.com/api/1.1/projects/", - "series": "https://patchwork.example.com/api/1.1/series/", - "users": "https://patchwork.example.com/api/1.1/users/" + "bundles": "https://patchwork.example.com/api/1.2/bundles/", + "covers": "https://patchwork.example.com/api/1.2/covers/", + "events": "https://patchwork.example.com/api/1.2/events/", + "patches": "https://patchwork.example.com/api/1.2/patches/", + "people": "https://patchwork.example.com/api/1.2/people/", + "projects": "https://patchwork.example.com/api/1.2/projects/", + "series": "https://patchwork.example.com/api/1.2/series/", + "users": "https://patchwork.example.com/api/1.2/users/" } @@ -69,17 +75,17 @@ well-supported. To repeat the above example using `requests`:, run $ python >>> import json >>> import requests - >>> r = requests.get('https://patchwork.example.com/api/1.1/') + >>> r = requests.get('https://patchwork.example.com/api/1.2/') >>> print(json.dumps(r.json(), indent=2)) { - "bundles": "https://patchwork.example.com/api/1.1/bundles/", - "covers": "https://patchwork.example.com/api/1.1/covers/", - "events": "https://patchwork.example.com/api/1.1/events/", - "patches": "https://patchwork.example.com/api/1.1/patches/", - "people": "https://patchwork.example.com/api/1.1/people/", - "projects": "https://patchwork.example.com/api/1.1/projects/", - "series": "https://patchwork.example.com/api/1.1/series/", - "users": "https://patchwork.example.com/api/1.1/users/" + "bundles": "https://patchwork.example.com/api/1.2/bundles/", + "covers": "https://patchwork.example.com/api/1.2/covers/", + "events": "https://patchwork.example.com/api/1.2/events/", + "patches": "https://patchwork.example.com/api/1.2/patches/", + "people": "https://patchwork.example.com/api/1.2/people/", + "projects": "https://patchwork.example.com/api/1.2/projects/", + "series": "https://patchwork.example.com/api/1.2/series/", + "users": "https://patchwork.example.com/api/1.2/users/" } Tools like `curl` and libraries like `requests` can be used to build anything @@ -98,7 +104,7 @@ Versioning ---------- By default, all requests will receive the latest version of the API: currently -``1.1``: +``1.2``: .. code-block:: http @@ -109,7 +115,7 @@ changes breaking your application: .. code-block:: http - GET /api/1.1 HTTP/1.1 + GET /api/1.2 HTTP/1.1 Older API versions will be deprecated and removed over time. For more information, refer to :ref:`rest-api-versions`. @@ -263,6 +269,7 @@ Supported Versions 1.0, 2.0, ✓ 1.1, 2.1, ✓ + 1.2, 2.2, ✓ Further information about this and more can typically be found in :doc:`the release notes `. @@ -278,6 +285,7 @@ Auto-generated schema documentation is provided below. /api/rest/schemas/v1.0 /api/rest/schemas/v1.1 + /api/rest/schemas/v1.2 .. Links diff --git a/docs/api/rest/schemas/v1.1.rst b/docs/api/rest/schemas/v1.1.rst index e18f813..1189f31 100644 --- a/docs/api/rest/schemas/v1.1.rst +++ b/docs/api/rest/schemas/v1.1.rst @@ -1,5 +1,5 @@ -API v1.1 (latest) -================= +API v1.1 +======== .. openapi:: ../../schemas/v1.1/patchwork.yaml :examples: diff --git a/docs/api/rest/schemas/v1.2.rst b/docs/api/rest/schemas/v1.2.rst new file mode 100644 index 0000000..8a96519 --- /dev/null +++ b/docs/api/rest/schemas/v1.2.rst @@ -0,0 +1,5 @@ +API v1.2 (latest) +================= + +.. openapi:: ../../schemas/v1.2/patchwork.yaml + :examples: diff --git a/docs/api/schemas/generate_schema.py b/docs/api/schemas/generate_schema.py index 39f5cf0..d4645d1 100644 --- a/docs/api/schemas/generate_schema.py +++ b/docs/api/schemas/generate_schema.py @@ -5,8 +5,8 @@ import os import jinja2 ROOT_DIR = os.path.dirname(os.path.realpath(__file__)) -VERSIONS = [(1, 0), (1, 1), None] -LATEST_VERSION = (1, 1) +VERSIONS = [(1, 0), (1, 1), (1, 2), None] +LATEST_VERSION = (1, 2) def generate_schema(): diff --git a/docs/api/schemas/latest/patchwork.yaml b/docs/api/schemas/latest/patchwork.yaml index 724b05e..4d50bb7 100644 --- a/docs/api/schemas/latest/patchwork.yaml +++ b/docs/api/schemas/latest/patchwork.yaml @@ -12,7 +12,7 @@ info: license: name: GPL v2 License url: https://www.gnu.org/licenses/gpl-2.0.html - version: '1.1' + version: '1.2' paths: /api/: get: @@ -1863,6 +1863,11 @@ components: type: string readOnly: true maxLength: 64 + patches_mbox: + title: Patches mbox + type: string + format: uri + readOnly: true Series: type: object properties: diff --git a/docs/api/schemas/patchwork.j2 b/docs/api/schemas/patchwork.j2 index 5e2f5e4..d71b9e2 100644 --- a/docs/api/schemas/patchwork.j2 +++ b/docs/api/schemas/patchwork.j2 @@ -1879,6 +1879,13 @@ components: type: string readOnly: true maxLength: 64 +{% endif %} +{% if version > (1, 1) %} + patches_mbox: + title: Patches mbox + type: string + format: uri + readOnly: true {% endif %} Series: type: object diff --git a/docs/api/schemas/v1.2/patchwork.yaml b/docs/api/schemas/v1.2/patchwork.yaml new file mode 100644 index 0000000..d703fa2 --- /dev/null +++ b/docs/api/schemas/v1.2/patchwork.yaml @@ -0,0 +1,2319 @@ +# DO NOT EDIT THIS FILE. It is generated from a template. Changes should be +# proposed against the template. +--- +openapi: '3.0.0' +info: + title: Patchwork API + description: > + Patchwork is a web-based patch tracking system designed to facilitate the + contribution and management of contributions to an open-source project. + contact: + email: patchwork@lists.ozlabs.org + license: + name: GPL v2 License + url: https://www.gnu.org/licenses/gpl-2.0.html + version: '1.2' +paths: + /api/1.2/: + get: + description: List API resources. + operationId: api_list + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Index' + tags: + - api + /api/1.2/bundles/: + get: + description: List bundles. + operationId: bundles_list + parameters: + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/Order' + - $ref: '#/components/parameters/Search' + - in: query + name: project + description: An ID or linkname of a project to filter bundles by. + schema: + title: '' + type: string + - in: query + name: owner + description: An ID or username of a user to filter bundles by. + schema: + title: '' + type: string + - in: query + name: public + description: Show only public (`true`) or private (`false`) bundles. + schema: + title: '' + type: string + enum: + - 'true' + - 'false' + responses: + '200': + description: '' + headers: + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Bundle' + tags: + - bundles + /api/1.2/bundles/{id}/: + get: + description: Show a bundle. + operationId: bundles_read + parameters: + - in: path + name: id + required: true + description: A unique integer value identifying this bundle. + schema: + title: ID + type: integer + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Bundle' + '404': + description: Not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + tags: + - bundles + /api/1.2/covers/: + get: + description: List cover letters. + operationId: covers_list + parameters: + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/Order' + - $ref: '#/components/parameters/Search' + - $ref: '#/components/parameters/BeforeFilter' + - $ref: '#/components/parameters/SinceFilter' + - in: query + name: project + description: > + An ID or linkname of a project to filter cover letters by. + schema: + title: '' + type: string + - in: query + name: series + description: An ID of a series to filter cover letters by. + schema: + title: '' + type: string + - in: query + name: submitter + description: > + An ID or email address of a person to filter cover letters by. + schema: + title: '' + type: string + responses: + '200': + description: '' + headers: + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/CoverLetterList' + tags: + - covers + /api/1.2/covers/{id}/: + get: + description: Show a cover letter. + operationId: covers_read + parameters: + - in: path + name: id + description: A unique integer value identifying this cover letter. + required: true + schema: + title: ID + type: integer + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/CoverLetterDetail' + '404': + description: Not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + tags: + - covers + /api/1.2/covers/{id}/comments/: + get: + description: List comments + operationId: cover_comments_list + parameters: + - in: path + name: id + description: > + A unique integer value identifying the parent cover letter. + required: true + schema: + title: ID + type: integer + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/Order' + - $ref: '#/components/parameters/Search' + responses: + '200': + description: '' + headers: + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Comment' + '404': + description: Not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + tags: + - comments + /api/1.2/events/: + get: + description: List events. + operationId: events_list + parameters: + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/Order' + - $ref: '#/components/parameters/Search' + - $ref: '#/components/parameters/BeforeFilter' + - $ref: '#/components/parameters/SinceFilter' + - in: query + name: project + description: An ID or linkname of a project to filter events by. + schema: + title: '' + type: string + - in: query + name: category + description: An event category to filter events by. + schema: + title: '' + type: string + enum: + - cover-created + - patch-created + - patch-completed + - patch-state-changed + - patch-delegated + - check-created + - series-created + - series-completed + - in: query + name: series + description: An ID of a series to filter events by. + schema: + title: '' + type: integer + - in: query + name: patch + description: An ID of a patch to filter events by. + schema: + title: '' + type: integer + - in: query + name: cover + description: An ID of a cover letter to filter events by. + schema: + title: '' + type: integer + responses: + '200': + description: '' + headers: + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: array + items: + oneOf: + - $ref: '#/components/schemas/EventCoverCreated' + - $ref: '#/components/schemas/EventPatchCreated' + - $ref: '#/components/schemas/EventPatchCompleted' + - $ref: '#/components/schemas/EventPatchStateChanged' + - $ref: '#/components/schemas/EventPatchDelegated' + - $ref: '#/components/schemas/EventCheckCreated' + - $ref: '#/components/schemas/EventSeriesCreated' + - $ref: '#/components/schemas/EventSeriesCompleted' + discriminator: + propertyName: category + mapping: + cover-created: '#/components/schemas/EventCoverCreated' + patch-created: '#/components/schemas/EventPatchCreated' + patch-completed: > + '#/components/schemas/EventPatchCompleted' + patch-state-changed: > + '#/components/schemas/EventPatchStateChanged' + patch-delegated: > + '#/components/schemas/EventPatchDelegated' + check-created: '#/components/schemas/EventCheckCreated' + series-created: '#/components/schemas/EventSeriesCreated' + series-completed: > + '#/components/schemas/EventSeriesCompleted' + tags: + - events + /api/1.2/patches/: + get: + description: List patches. + operationId: patches_list + parameters: + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/Order' + - $ref: '#/components/parameters/Search' + - $ref: '#/components/parameters/BeforeFilter' + - $ref: '#/components/parameters/SinceFilter' + - in: query + name: project + description: An ID or linkname of a project to filter patches by. + schema: + title: '' + type: string + - in: query + name: series + description: An ID of a series to filter patches by. + schema: + title: '' + type: integer + - in: query + name: submitter + description: > + An ID or email address of a person to filter patches by. + schema: + title: '' + type: string + - in: query + name: delegate + description: An ID or username of a user to filter patches by. + schema: + title: '' + type: string + - in: query + name: state + description: A slug representation of a state to filter patches by. + schema: + title: '' + type: string + - in: query + name: archived + description: > + Show only archived (`true`) or non-archived (`false`) patches. + schema: + title: '' + type: string + enum: + - 'true' + - 'false' + responses: + '200': + description: '' + headers: + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PatchList' + tags: + - patches + /api/1.2/patches/{id}/: + get: + description: Show a patch. + operationId: patches_read + parameters: + - in: path + name: id + description: A unique integer value identifying this patch. + required: true + schema: + title: ID + type: integer + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/PatchDetail' + '404': + description: Not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + tags: + - patches + patch: + description: Update a patch (partial). + operationId: patches_partial_update + security: + - basicAuth: [] + - apiKeyAuth: [] + parameters: + - in: path + name: id + description: A unique integer value identifying this patch. + required: true + schema: + title: ID + type: integer + requestBody: + $ref: '#/components/requestBodies/Patch' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/PatchDetail' + '400': + description: Invalid Request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorPatchUpdate' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + tags: + - patches + put: + description: Update a patch. + operationId: patches_update + security: + - basicAuth: [] + - apiKeyAuth: [] + parameters: + - in: path + name: id + description: A unique integer value identifying this patch. + required: true + schema: + title: ID + type: integer + requestBody: + $ref: '#/components/requestBodies/Patch' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/PatchDetail' + '400': + description: Invalid Request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorPatchUpdate' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + tags: + - patches + /api/1.2/patches/{id}/comments/: + get: + description: List comments + operationId: patch_comments_list + parameters: + - in: path + name: id + description: A unique integer value identifying the parent patch. + required: true + schema: + title: ID + type: integer + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/Order' + - $ref: '#/components/parameters/Search' + responses: + '200': + description: '' + headers: + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Comment' + '404': + description: Not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + tags: + - comments + /api/1.2/patches/{patch_id}/checks/: + get: + description: List checks. + operationId: checks_list + parameters: + - in: path + name: patch_id + description: A unique integer value identifying the parent patch. + required: true + schema: + title: Patch ID + type: integer + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/Order' + - $ref: '#/components/parameters/Search' + - $ref: '#/components/parameters/BeforeFilter' + - $ref: '#/components/parameters/SinceFilter' + - in: query + name: user + description: An ID or username of a user to filter checks by. + schema: + title: '' + type: string + - in: query + name: state + description: A check state to filter checks by. + schema: + title: '' + type: string + enum: + - pending + - success + - warning + - fail + - in: query + name: context + description: A check context to filter checks by. + schema: + title: '' + type: string + responses: + '200': + description: '' + headers: + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Check' + '404': + description: Not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + tags: + - checks + post: + description: Create a check. + operationId: checks_create + security: + - basicAuth: [] + - apiKeyAuth: [] + parameters: + - in: path + name: patch_id + description: A unique integer value identifying the parent patch. + required: true + schema: + title: Patch ID + type: integer + requestBody: + $ref: '#/components/requestBodies/Check' + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Check' + '400': + description: Invalid Request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorCheckCreate' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + tags: + - checks + /api/1.2/patches/{patch_id}/checks/{check_id}/: + get: + description: Show a check. + operationId: checks_read + parameters: + - in: path + name: patch_id + description: A unique integer value identifying the parent patch. + required: true + schema: + title: Patch ID + type: integer + - in: path + name: check_id + description: A unique integer value identifying this check. + required: true + schema: + title: Check ID + type: integer + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Check' + '404': + description: Not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + tags: + - checks + /api/1.2/people/: + get: + description: List people. + operationId: people_list + security: + - basicAuth: [] + - apiKeyAuth: [] + parameters: + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/Order' + - $ref: '#/components/parameters/Search' + responses: + '200': + description: '' + headers: + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Person' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + tags: + - people + /api/1.2/people/{id}/: + get: + description: Show a person. + operationId: people_read + security: + - basicAuth: [] + - apiKeyAuth: [] + parameters: + - in: path + name: id + description: A unique integer value identifying this person. + required: true + schema: + title: ID + type: integer + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Person' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + tags: + - people + /api/1.2/projects/: + get: + description: List projects. + operationId: projects_list + parameters: + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/Order' + - $ref: '#/components/parameters/Search' + responses: + '200': + description: '' + headers: + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Project' + tags: + - projects + /api/1.2/projects/{id}/: + get: + description: Show a project. + operationId: projects_read + parameters: + - in: path + name: id + description: A unique integer value identifying this project. + required: true + schema: + title: ID + type: integer + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Project' + '404': + description: Not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + tags: + - projects + patch: + description: Update a project (partial). + operationId: projects_partial_update + security: + - basicAuth: [] + - apiKeyAuth: [] + parameters: + - in: path + name: id + description: A unique integer value identifying this project. + required: true + schema: + title: ID + type: integer + requestBody: + $ref: '#/components/requestBodies/Project' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Project' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorProjectUpdate' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + tags: + - projects + put: + description: Update a project. + operationId: projects_update + security: + - basicAuth: [] + - apiKeyAuth: [] + parameters: + - in: path + name: id + description: A unique integer value identifying this project. + required: true + schema: + title: ID + type: integer + requestBody: + $ref: '#/components/requestBodies/Project' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Project' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorProjectUpdate' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + tags: + - projects + /api/1.2/series/: + get: + description: List series. + operationId: series_list + parameters: + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/Order' + - $ref: '#/components/parameters/Search' + - $ref: '#/components/parameters/BeforeFilter' + - $ref: '#/components/parameters/SinceFilter' + - in: query + name: submitter + description: An ID or email address of a person to filter series by. + schema: + title: '' + type: string + - in: query + name: project + description: An ID or linkname of a project to filter series by. + schema: + title: '' + type: string + responses: + '200': + description: '' + headers: + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Series' + tags: + - series + /api/1.2/series/{id}/: + get: + description: Show a series. + operationId: series_read + parameters: + - in: path + name: id + description: A unique integer value identifying this series. + required: true + schema: + title: ID + type: integer + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Series' + '404': + description: Not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + tags: + - series + /api/1.2/users/: + get: + description: List users. + operationId: users_list + security: + - basicAuth: [] + - apiKeyAuth: [] + parameters: + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/Order' + - $ref: '#/components/parameters/Search' + responses: + '200': + description: '' + headers: + Link: + $ref: '#/components/headers/Link' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/User' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + tags: + - users + /api/1.2/users/{id}/: + get: + description: Show a user. + operationId: users_read + security: + - basicAuth: [] + - apiKeyAuth: [] + parameters: + - in: path + name: id + description: A unique integer value identifying this user. + required: true + schema: + title: ID + type: integer + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/User' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + tags: + - users + patch: + description: Update a user (partial). + operationId: users_partial_update + security: + - basicAuth: [] + - apiKeyAuth: [] + parameters: + - in: path + name: id + description: A unique integer value identifying this user. + required: true + schema: + title: ID + type: integer + requestBody: + $ref: '#/components/requestBodies/User' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/User' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorUserUpdate' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + tags: + - users + put: + description: Update a user. + operationId: users_update + security: + - basicAuth: [] + - apiKeyAuth: [] + parameters: + - in: path + name: id + description: A unique integer value identifying this user. + required: true + schema: + title: ID + type: integer + requestBody: + $ref: '#/components/requestBodies/User' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/User' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorUserUpdate' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + tags: + - users +components: + securitySchemes: + basicAuth: + type: http + scheme: basic + apiKeyAuth: + type: http + scheme: bearer + parameters: + Page: + in: query + name: page + description: A page number within the paginated result set. + schema: + title: Page + type: integer + PageSize: + in: query + name: per_page + description: Number of results to return per page. + schema: + title: Page size + type: integer + Order: + in: query + name: order + description: Which field to use when ordering the results. + schema: + title: Ordering + type: string + Search: + in: query + name: q + description: A search term. + schema: + title: Search + type: string + BeforeFilter: + in: query + name: before + description: Latest date-time to retrieve results for. + schema: + title: '' + type: string + SinceFilter: + in: query + name: since + description: Earliest date-time to retrieve results for. + schema: + title: '' + type: string + headers: + Link: + description: > + Links to related resources, in the format defined by + [RFC 5988](https://tools.ietf.org/html/rfc5988#section-5). + This will include a link with relation type `next` to the + next page, if there is a next page. + schema: + type: string + requestBodies: + Check: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CheckCreate' + multipart/form-data: + schema: + $ref: '#/components/schemas/CheckCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CheckCreate' + Patch: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PatchUpdate' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchUpdate' + Project: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Project' + multipart/form-data: + schema: + $ref: '#/components/schemas/Project' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Project' + User: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/User' + multipart/form-data: + schema: + $ref: '#/components/schemas/User' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/User' + schemas: + Index: + type: object + properties: + bundles: + title: Bundles URL + type: string + format: uri + readOnly: true + covers: + title: Covers URL + type: string + format: uri + readOnly: true + events: + title: Events URL + type: string + format: uri + readOnly: true + patches: + title: Patches URL + type: string + format: uri + readOnly: true + people: + title: People URL + type: string + format: uri + readOnly: true + projects: + title: Projects URL + type: string + format: uri + readOnly: true + users: + title: Users URL + type: string + format: uri + readOnly: true + Bundle: + required: + - name + type: object + properties: + id: + title: ID + type: integer + readOnly: true + url: + title: URL + type: string + format: uri + readOnly: true + web_url: + title: Web URL + type: string + format: uri + readOnly: true + project: + $ref: '#/components/schemas/ProjectEmbedded' + name: + title: Name + type: string + minLength: 1 + maxLength: 50 + owner: + type: object + title: Owner + readOnly: true + allOf: + - $ref: '#/components/schemas/UserEmbedded' + patches: + type: array + items: + $ref: '#/components/schemas/PatchEmbedded' + readOnly: true + uniqueItems: true + public: + title: Public + type: boolean + mbox: + title: Mbox + type: string + format: uri + readOnly: true + Check: + type: object + properties: + id: + title: ID + type: integer + readOnly: true + url: + title: Url + type: string + format: uri + readOnly: true + user: + $ref: '#/components/schemas/UserEmbedded' + date: + title: Date + type: string + format: iso8601 + readOnly: true + state: + title: State + description: The state of the check. + type: string + enum: + - pending + - success + - warning + - fail + target_url: + title: Target URL + description: > + The target URL to associate with this check. This should be + specific to the patch. + type: string + format: uri + maxLength: 200 + nullable: true + context: + title: Context + description: > + A label to discern check from checks of other testing systems. + type: string + pattern: ^[-a-zA-Z0-9_]+$ + minLength: 1 + maxLength: 255 + description: + title: Description + description: A brief description of the check. + type: string + nullable: true + CheckCreate: + type: object + required: + - state + properties: + state: + title: State + description: The state of the check. + type: string + enum: + - pending + - success + - warning + - fail + target_url: + title: Target URL + description: + The target URL to associate with this check. This should be + specific to the patch. + type: string + format: uri + maxLength: 200 + nullable: true + context: + title: Context + description: > + A label to discern check from checks of other testing systems. + type: string + pattern: ^[-a-zA-Z0-9_]+$ + minLength: 1 + maxLength: 255 + description: + title: Description + description: A brief description of the check. + type: string + nullable: true + Comment: + type: object + properties: + id: + title: ID + type: integer + readOnly: true + web_url: + title: Web URL + type: string + format: uri + readOnly: true + msgid: + title: Message ID + type: string + readOnly: true + minLength: 1 + maxLength: 255 + date: + title: Date + type: string + format: iso8601 + readOnly: true + subject: + title: Subject + type: string + readOnly: true + submitter: + type: object + title: Submitter + allOf: + - $ref: '#/components/schemas/PersonEmbedded' + content: + title: Content + type: string + readOnly: true + minLength: 1 + headers: + title: Headers + type: array + items: + type: string + readOnly: true + CoverLetterList: + type: object + properties: + id: + title: ID + type: integer + readOnly: true + url: + title: URL + type: string + format: uri + readOnly: true + web_url: + title: Web URL + type: string + format: uri + readOnly: true + project: + $ref: '#/components/schemas/ProjectEmbedded' + msgid: + title: Message ID + type: string + readOnly: true + minLength: 1 + maxLength: 255 + date: + title: Date + type: string + format: iso8601 + readOnly: true + name: + title: Name + type: string + readOnly: true + minLength: 1 + maxLength: 255 + submitter: + type: object + title: Submitter + readOnly: true + allOf: + - $ref: '#/components/schemas/PersonEmbedded' + mbox: + title: Mbox + type: string + format: uri + readOnly: true + series: + type: array + items: + $ref: '#/components/schemas/SeriesEmbedded' + readOnly: true + comments: + title: Comments + type: string + format: uri + readOnly: true + CoverLetterDetail: + allOf: + - $ref: '#/components/schemas/CoverLetterList' + - properties: + headers: + title: Headers + type: array + items: + type: string + readOnly: true + content: + title: Content + type: string + readOnly: true + minLength: 1 + EventBase: + type: object + properties: + id: + title: ID + type: integer + readOnly: true + category: + title: Category + description: The category of the event. + type: string + readOnly: true + project: + $ref: '#/components/schemas/ProjectEmbedded' + date: + title: Date + description: The time this event was created. + type: string + format: iso8601 + readOnly: true + payload: + type: object + EventCoverCreated: + allOf: + - $ref: '#/components/schemas/EventBase' + - type: object + properties: + category: + enum: + - cover-created + payload: + properties: + cover: + title: Cover + type: string + readOnly: true + EventPatchCreated: + allOf: + - $ref: '#/components/schemas/EventBase' + - type: object + properties: + category: + enum: + - patch-created + payload: + properties: + patch: + $ref: '#/components/schemas/PatchEmbedded' + EventPatchCompleted: + allOf: + - $ref: '#/components/schemas/EventBase' + - type: object + properties: + category: + enum: + - patch-completed + payload: + properties: + patch: + $ref: '#/components/schemas/PatchEmbedded' + series: + $ref: '#/components/schemas/SeriesEmbedded' + EventPatchStateChanged: + allOf: + - $ref: '#/components/schemas/EventBase' + - type: object + properties: + category: + enum: + - patch-state-changed + payload: + properties: + patch: + $ref: '#/components/schemas/PatchEmbedded' + previous_state: + title: Previous state + type: string + current_state: + title: Current state + type: string + EventPatchDelegated: + allOf: + - $ref: '#/components/schemas/EventBase' + - type: object + properties: + category: + enum: + - patch-delegated + payload: + properties: + patch: + $ref: '#/components/schemas/PatchEmbedded' + previous_delegate: + allOf: + - $ref: '#/components/schemas/UserEmbedded' + - title: Previous delegate + current_delegate: + allOf: + - $ref: '#/components/schemas/UserEmbedded' + - title: Current delegate + EventCheckCreated: + allOf: + - $ref: '#/components/schemas/EventBase' + - type: object + properties: + category: + enum: + - check-created + payload: + properties: + patch: + $ref: '#/components/schemas/PatchEmbedded' + check: + $ref: '#/components/schemas/CheckEmbedded' + EventSeriesCreated: + allOf: + - $ref: '#/components/schemas/EventBase' + - type: object + properties: + category: + enum: + - series-created + payload: + properties: + series: + $ref: '#/components/schemas/SeriesEmbedded' + EventSeriesCompleted: + allOf: + - $ref: '#/components/schemas/EventBase' + - type: object + properties: + category: + enum: + - series-completed + payload: + properties: + series: + $ref: '#/components/schemas/SeriesEmbedded' + PatchList: + required: + - state + - delegate + type: object + properties: + id: + title: ID + type: integer + readOnly: true + url: + title: URL + type: string + format: uri + readOnly: true + web_url: + title: Web URL + type: string + format: uri + readOnly: true + project: + $ref: '#/components/schemas/ProjectEmbedded' + msgid: + title: Message ID + type: string + readOnly: true + minLength: 1 + maxLength: 255 + date: + title: Date + type: string + format: iso8601 + readOnly: true + name: + title: Name + type: string + readOnly: true + minLength: 1 + maxLength: 255 + commit_ref: + title: Commit ref + type: string + maxLength: 255 + nullable: true + pull_url: + title: Pull URL + type: string + format: uri + maxLength: 255 + nullable: true + state: + title: State + type: string + archived: + title: Archived + type: boolean + hash: + title: Hash + type: string + readOnly: true + minLength: 1 + submitter: + type: object + title: Submitter + readOnly: true + allOf: + - $ref: '#/components/schemas/PersonEmbedded' + delegate: + type: object + title: Delegate + nullable: true + readOnly: true + allOf: + - $ref: '#/components/schemas/UserEmbedded' + mbox: + title: Mbox + type: string + format: uri + readOnly: true + series: + type: array + items: + $ref: '#/components/schemas/SeriesEmbedded' + readOnly: true + comments: + title: Comments + type: string + format: uri + readOnly: true + check: + title: Check + type: string + readOnly: true + enum: + - pending + - success + - warning + - fail + checks: + title: Checks + type: string + format: uri + readOnly: true + tags: + title: Tags + type: array + items: + type: string + readOnly: true + PatchDetail: + allOf: + - $ref: '#/components/schemas/PatchList' + - properties: + headers: + title: Headers + type: array + items: + type: string + readOnly: true + content: + title: Content + type: string + readOnly: true + minLength: 1 + diff: + title: Diff + type: string + readOnly: true + minLength: 1 + prefixes: + title: Prefixes + type: array + items: + type: string + readOnly: true + PatchUpdate: + type: object + properties: + commit_ref: + title: Commit ref + type: string + maxLength: 255 + nullable: true + pull_url: + title: Pull URL + type: string + format: uri + maxLength: 255 + nullable: true + state: + title: State + type: string + archived: + title: Archived + type: boolean + delegate: + title: Delegate + type: integer + nullable: true + Person: + type: object + properties: + id: + title: ID + type: integer + readOnly: true + url: + title: URL + type: string + format: uri + readOnly: true + name: + title: Name + type: string + readOnly: true + minLength: 1 + maxLength: 255 + email: + title: Email + type: string + format: email + readOnly: true + minLength: 1 + maxLength: 255 + user: + type: object + title: User + nullable: true + readOnly: true + allOf: + - $ref: '#/components/schemas/UserEmbedded' + Project: + type: object + properties: + id: + title: ID + type: integer + readOnly: true + url: + title: URL + type: string + format: uri + readOnly: true + name: + title: Name + type: string + readOnly: true + minLength: 1 + maxLength: 255 + link_name: + title: Link name + type: string + readOnly: true + minLength: 1 + maxLength: 255 + list_id: + title: List ID + type: string + readOnly: true + minLength: 1 + maxLength: 255 + list_email: + title: List email + type: string + format: email + readOnly: true + minLength: 1 + maxLength: 200 + web_url: + title: Web URL + type: string + format: uri + maxLength: 2000 + scm_url: + title: SCM URL + type: string + format: uri + maxLength: 2000 + webscm_url: + title: Web SCM URL + type: string + format: uri + maxLength: 2000 + maintainers: + type: array + items: + $ref: '#/components/schemas/UserEmbedded' + readOnly: true + uniqueItems: true + subject_match: + title: Subject match + description: > + Regex to match the subject against if only part of emails sent to + the list belongs to this project. Will be used with IGNORECASE and + MULTILINE flags. If rules for more projects match the first one + returned from DB is chosen; empty field serves as a default for + every email which has no other match. + type: string + readOnly: true + maxLength: 64 + patches_mbox: + title: Patches mbox + type: string + format: uri + readOnly: true + Series: + type: object + properties: + id: + title: ID + type: integer + readOnly: true + url: + title: URL + type: string + format: uri + readOnly: true + web_url: + title: Web URL + type: string + format: uri + readOnly: true + project: + $ref: '#/components/schemas/ProjectEmbedded' + name: + title: Name + description: > + An optional name to associate with the series, e.g. "John's PCI + series". + type: string + maxLength: 255 + nullable: true + date: + title: Date + type: string + format: iso8601 + readOnly: true + submitter: + type: object + title: Submitter + readOnly: true + allOf: + - $ref: '#/components/schemas/PersonEmbedded' + version: + title: Version + description: > + Version of series as indicated by the subject prefix(es). + type: integer + total: + title: Total + description: > + Number of patches in series as indicated by the subject prefix(es). + type: integer + readOnly: true + received_total: + title: Received total + type: integer + readOnly: true + received_all: + title: Received all + type: boolean + readOnly: true + mbox: + title: Mbox + type: string + format: uri + readOnly: true + cover_letter: + $ref: '#/components/schemas/CoverLetterEmbedded' + patches: + type: array + items: + $ref: '#/components/schemas/PatchEmbedded' + readOnly: true + uniqueItems: true + User: + type: object + properties: + id: + title: ID + type: integer + readOnly: true + url: + title: URL + type: string + format: uri + readOnly: true + username: + title: Username + type: string + readOnly: true + minLength: 1 + maxLength: 150 + first_name: + title: First name + type: string + maxLength: 30 + last_name: + title: Last name + type: string + maxLength: 150 + email: + title: Email address + type: string + format: email + readOnly: true + minLength: 1 + CheckEmbedded: + type: object + properties: + id: + title: ID + type: integer + readOnly: true + url: + title: Url + type: string + format: uri + readOnly: true + date: + title: Date + type: string + format: iso8601 + readOnly: true + state: + title: State + description: The state of the check. + type: string + readOnly: true + enum: + - pending + - success + - warning + - fail + target_url: + title: Target url + description: > + The target URL to associate with this check. This should be specific + to the patch. + type: string + format: uri + maxLength: 200 + nullable: true + readOnly: true + context: + title: Context + description: > + A label to discern check from checks of other testing systems. + type: string + pattern: ^[-a-zA-Z0-9_]+$ + maxLength: 255 + minLength: 1 + readOnly: true + CoverLetterEmbedded: + type: object + properties: + id: + title: ID + type: integer + readOnly: true + url: + title: URL + type: string + format: uri + readOnly: true + web_url: + title: Web URL + type: string + format: uri + readOnly: true + msgid: + title: Message ID + type: string + readOnly: true + minLength: 1 + date: + title: Date + type: string + format: iso8601 + readOnly: true + name: + title: Name + type: string + readOnly: true + minLength: 1 + mbox: + title: Mbox + type: string + format: uri + readOnly: true + PatchEmbedded: + type: object + properties: + id: + title: ID + type: integer + readOnly: true + url: + title: URL + type: string + format: uri + readOnly: true + web_url: + title: Web URL + type: string + format: uri + readOnly: true + msgid: + title: Message ID + type: string + readOnly: true + minLength: 1 + date: + title: Date + type: string + format: iso8601 + readOnly: true + name: + title: Name + type: string + readOnly: true + minLength: 1 + mbox: + title: Mbox + type: string + format: uri + readOnly: true + PersonEmbedded: + type: object + properties: + id: + title: ID + type: integer + readOnly: true + url: + title: URL + type: string + format: uri + readOnly: true + name: + title: Name + type: string + readOnly: true + minLength: 1 + email: + title: Email + type: string + format: email + readOnly: true + minLength: 1 + ProjectEmbedded: + type: object + properties: + id: + title: ID + type: integer + readOnly: true + url: + title: URL + type: string + format: uri + readOnly: true + name: + title: Name + type: string + readOnly: true + minLength: 1 + link_name: + title: Link name + type: string + readOnly: true + maxLength: 255 + minLength: 1 + list_id: + title: List ID + type: string + readOnly: true + maxLength: 255 + minLength: 1 + list_email: + title: List email + type: string + format: email + readOnly: true + maxLength: 200 + minLength: 1 + web_url: + title: Web URL + type: string + format: uri + readOnly: true + maxLength: 2000 + scm_url: + title: SCM URL + type: string + format: uri + readOnly: true + maxLength: 2000 + webscm_url: + title: WebSCM URL + type: string + format: uri + readOnly: true + maxLength: 2000 + SeriesEmbedded: + type: object + properties: + id: + title: ID + type: integer + readOnly: true + url: + title: URL + type: string + format: uri + readOnly: true + web_url: + title: Web URL + type: string + format: uri + readOnly: true + name: + title: Name + description: > + An optional name to associate with the series, e.g. "John's PCI + series". + type: string + readOnly: true + maxLength: 255 + nullable: true + date: + title: Date + type: string + format: iso8601 + readOnly: true + version: + title: Version + description: > + Version of series as indicated by the subject prefix(es). + type: integer + readOnly: true + mbox: + title: Mbox + type: string + format: uri + readOnly: true + UserEmbedded: + type: object + properties: + id: + title: ID + type: integer + readOnly: true + url: + title: URL + type: string + format: uri + readOnly: true + username: + title: Username + type: string + readOnly: true + minLength: 1 + maxLength: 150 + first_name: + title: First name + type: string + maxLength: 30 + readOnly: true + last_name: + title: Last name + type: string + maxLength: 150 + readOnly: true + email: + title: Email address + type: string + format: email + readOnly: true + minLength: 1 + Error: + type: object + properties: + detail: + title: Detail + type: string + readOnly: true + ErrorCheckCreate: + type: object + properties: + state: + title: State + type: string + readOnly: true + target_url: + title: Target URL + type: string + readOnly: true + context: + title: Context + type: string + readOnly: true + description: + title: Description + type: string + readOnly: true + ErrorPatchUpdate: + type: object + properties: + state: + title: State + type: string + readOnly: true + delegate: + title: Delegate + type: string + readOnly: true + commit_ref: + title: Commit ref + type: string + readOnly: true + archived: + title: Archived + type: string + readOnly: true + ErrorProjectUpdate: + type: object + properties: + web_url: + title: Web URL + type: string + format: uri + readOnly: true + scm_url: + title: SCM URL + type: string + format: uri + readOnly: true + webscm_url: + title: Web SCM URL + type: string + format: uri + readOnly: true + ErrorUserUpdate: + type: object + properties: + first_name: + title: First name + type: string + readOnly: true + last_name: + title: First name + type: string + readOnly: true From patchwork Fri Jun 28 11:43:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mete Polat X-Patchwork-Id: 1124132 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45Zw0l6zmMz9s3Z for ; Fri, 28 Jun 2019 21:44:39 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="mc95kyC7"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 45Zw0l61F4zDqtY for ; Fri, 28 Jun 2019 21:44:39 +1000 (AEST) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2a00:1450:4864:20::443; helo=mail-wr1-x443.google.com; envelope-from=metepolat2000@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="mc95kyC7"; dkim-atps=neutral Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 45Zw0212sszDqly for ; Fri, 28 Jun 2019 21:44:01 +1000 (AEST) Received: by mail-wr1-x443.google.com with SMTP id v14so5959702wrr.4 for ; Fri, 28 Jun 2019 04:44:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XJvz0y0ic+vdB8qek1CUHR9/ab63XnxOA9Zs/AWeA7Q=; b=mc95kyC7rLyF84ARROsDxG6HBo1dWL/AeHH1+wR2R92Tt8XcauwUNnuHHbyPXohmNx 3Nk9oGv8d1rFzFs1lnhtCcaH6G11Sj4XkFFT1TaBnuHOhtGNR6fiTjJ4VKsP3dRO41OL vY6pV8h9og2npza2Nm9J0YXqJNlg48Zm0b4znJiBNoP5Qcx8hbgh70IepNFEGlbG4E3X WLnYK2ATrHsQ0HEvFcBWuFmYkIfsKd0dsOvxCSooZ/omYiqgS9Q9F+W0Qj4e1e3XUW92 4+L2fXHtMnPjAU6XMcAEVDwMggDRA0p8R95U6YBMwPG3G8MuO4DlVCrWDl/PHiKBijg5 aGPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XJvz0y0ic+vdB8qek1CUHR9/ab63XnxOA9Zs/AWeA7Q=; b=OdmnFeC92ScaUxFb8OZ06hHaMrpHAyE8iN1BBNeufnzwYpO6qc9LmyzqiZfH9vozTn dt+r1U24hPcO+VWHkylB77yTSqsOW4CI2RVPbDS3akWYrxODrcXXZR1SK8mxGCobTtyp vIazLQmYBqF5wVS+p3qVDVZ0C3FEy0HMyeqj7YJJ22Ln5o6g4enZ+M7a3rgx23J7mWnp kXoRxNBj7yj/yNvIIVIDiEljY+Oo+2NP1gmjQd0q3YRQNtGd7uTlmmXZ5GcAkYue1Omi om1Gziy7jC8gZOi7pD7sZhr0fFnI67MnL3p5vX3G+tFT9SB2WvphJraoHJUc7T9LCw1c zk4Q== X-Gm-Message-State: APjAAAWxFxW5K9/64cNw7PHD3/gTsI5+ArtF314YCoaQrw+RV7XVdh5E sBjt0YhMY8mlgNG/2nciemjirfe1hzx8dA== X-Google-Smtp-Source: APXvYqwBEbaY0WU5EJCvCzUL/EOD5Af3DtukIFZ6GloEecMXBeKTNedd1towE+hmdUHQ+SHNWiyjUg== X-Received: by 2002:a05:6000:1c9:: with SMTP id t9mr8054147wrx.187.1561722238429; Fri, 28 Jun 2019 04:43:58 -0700 (PDT) Received: from localhost.localdomain ([193.23.33.53]) by smtp.gmail.com with ESMTPSA id q12sm3258127wrp.50.2019.06.28.04.43.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Jun 2019 04:43:57 -0700 (PDT) From: Mete Polat To: patchwork@lists.ozlabs.org Subject: [PATCH 5/5] Add release notes: project patches as mbox Date: Fri, 28 Jun 2019 13:43:14 +0200 Message-Id: <20190628114314.10462-6-metepolat2000@gmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190628114314.10462-1-metepolat2000@gmail.com> References: <20190628114314.10462-1-metepolat2000@gmail.com> MIME-Version: 1.0 X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lukas.bulwahn@gmail.com Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" Signed-off-by: Mete Polat --- .../notes/project-patches-mbox-623f8c9d4cf6a952.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 releasenotes/notes/project-patches-mbox-623f8c9d4cf6a952.yaml -- 2.22.0 diff --git a/releasenotes/notes/project-patches-mbox-623f8c9d4cf6a952.yaml b/releasenotes/notes/project-patches-mbox-623f8c9d4cf6a952.yaml new file mode 100644 index 0000000..1afe58e --- /dev/null +++ b/releasenotes/notes/project-patches-mbox-623f8c9d4cf6a952.yaml @@ -0,0 +1,6 @@ +--- +api: + - | + Projects now expose a 'patches_mbox' uri field which bundles all patches in + a project as an mbox. This is similar to the already available mbox fields + for series, bundles, covers and patches itself.