From patchwork Fri Jun 28 11:43:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mete Polat X-Patchwork-Id: 1124130 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 45Zw082vR3z9s3Z for ; Fri, 28 Jun 2019 21:44:08 +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="Mvr37SB8"; 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 45Zw081lrBzDqpv for ; Fri, 28 Jun 2019 21:44:08 +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::430; helo=mail-wr1-x430.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="Mvr37SB8"; dkim-atps=neutral Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) (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 45Zw011ps8zDqlr for ; Fri, 28 Jun 2019 21:43:57 +1000 (AEST) Received: by mail-wr1-x430.google.com with SMTP id d18so5962712wrs.5 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:mime-version :content-transfer-encoding; bh=lX86DOs6njFC1nZ2EDja22wfBWH53S/rIx7d/QLWJQE=; b=Mvr37SB8OtFLth6yV+brd0PDFcZKWpJW3RwdW1UBm3CWB2xwgK8I7qtfniYWNsrUeI oDvqZBjRV5qyg2AGT+Y3IivHrmnuhkvzGp1IEuoQ1HyG4IN6rpqbOzWIL4CsVX8D9kPU fXINcsmfZOAP7VcdTDZGXD+xLuvfE8dPI6CGyB0XMZfxFbFtUA53x64xd6f2+Q3iglEO 77pYkG9fJs8TczP+hyLnUMsqS5gb2MywE5ZU8KYx2PdWdnS0hfkvWjn9QQSLviW8H0SU Jgx7ixrysl4vTs6BT7eHpGmKvLphYQ3f0X1Eyjd2oHe7EBskm3/aNOAXFthO4tNNE4Ae t7dA== 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:mime-version :content-transfer-encoding; bh=lX86DOs6njFC1nZ2EDja22wfBWH53S/rIx7d/QLWJQE=; b=P/u4Uucxq6dfA8slH+huj35xoy41F44PPGqaBME7dmRlY4YKjwJEIhJsNN855GNukW L2CDMy2ElUhZHnbS38FZUtST0flr/lCD9CGghBjmxfzJjQTt7jXamx962ry69BzuYZCH SnfmgSwoZ7XunD9hscyr6IkjEASIj9NsH2btjlZhwyHDXIyeWLn5bgA8d7VUu9XQ35AO gaOBGy3MyWxOzdO1e1zq0KAovafMZILqjyTPEIJEE/qBcny1UdFFzSO92NG7hDDraow2 rBnnXudWKoqOvAOG/QbQmRXHwIO+5GbO8OXWRWDB4PznLPeLpZDJCgzp749Lp5gmK8cF IfOQ== X-Gm-Message-State: APjAAAVky4z/E9Cl9nMH1zGdNE0qMpRXVx/O/5dFmWwM95w7uge6b9KK 3qHMboORu7fQnMPDQphWdtyX+5rEEteImw== X-Google-Smtp-Source: APXvYqxrHtR6urLi/ER8yHUXXShb4wXCQkS/TwjAjJDG9/fp2UCWM2VA+pZgRPDHJoeofYuXpKIPrg== X-Received: by 2002:adf:b64e:: with SMTP id i14mr7857226wre.248.1561722233129; Fri, 28 Jun 2019 04:43:53 -0700 (PDT) Received: from localhost.localdomain ([193.23.33.53]) by smtp.gmail.com with ESMTPSA id q12sm3258127wrp.50.2019.06.28.04.43.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Jun 2019 04:43:52 -0700 (PDT) From: Mete Polat To: patchwork@lists.ozlabs.org Subject: [PATCH 0/5] Update REST API: Add 'project patches as mbox' field Date: Fri, 28 Jun 2019 13:43:09 +0200 Message-Id: <20190628114314.10462-1-metepolat2000@gmail.com> X-Mailer: git-send-email 2.22.0 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" Patchwork already has the ability to export patches, series, covers and bundles as an mbox file. This patch extends that ability to projects as well. Therefore a new url and api field has been introduced. New url: project//list/mbox/ New project rest api field: patches_mbox Like patchwork.example.com/project//list/ the final project.mbox only includes patches. Careful naming has been made in case the api should support export of a whole project in the future as well. Mete Polat (5): Add option to get all project patches in one mbox Add url to get all project patches in one mbox Add api endpoint for project patches as mbox Update api documentation for v1.2 Add release notes: project patches as mbox 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 +++++++++++++++++ patchwork/api/project.py | 11 +- patchwork/models.py | 25 +- patchwork/urls.py | 2 + patchwork/views/patch.py | 12 + patchwork/views/utils.py | 13 + ...project-patches-mbox-623f8c9d4cf6a952.yaml | 6 + 13 files changed, 2426 insertions(+), 39 deletions(-) create mode 100644 docs/api/rest/schemas/v1.2.rst create mode 100644 docs/api/schemas/v1.2/patchwork.yaml create mode 100644 releasenotes/notes/project-patches-mbox-623f8c9d4cf6a952.yaml