Show a patch.

GET /api/1.1/patches/18319/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 18319,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/18319/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/18319/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20230228061859.2957748-1-paul.elder@ideasonboard.com>",
    "date": "2023-02-28T06:18:59",
    "name": "[libcamera-devel,v2] utils: checkstyle.py: Don't run commit title checker on staged commits",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "7426f6ae81affe1390acb3c0bc75e4a8e479b476",
    "submitter": {
        "id": 17,
        "url": "https://patchwork.libcamera.org/api/1.1/people/17/?format=api",
        "name": "Paul Elder",
        "email": "paul.elder@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/18319/mbox/",
    "series": [
        {
            "id": 3776,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3776/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3776",
            "date": "2023-02-28T06:18:59",
            "name": "[libcamera-devel,v2] utils: checkstyle.py: Don't run commit title checker on staged commits",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/3776/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/18319/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/18319/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>",
        "X-Original-To": "parsemail@patchwork.libcamera.org",
        "Delivered-To": "parsemail@patchwork.libcamera.org",
        "Received": [
            "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 221EEBE08A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 28 Feb 2023 06:19:16 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5F1C162691;\n\tTue, 28 Feb 2023 07:19:15 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E46206265A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 28 Feb 2023 07:19:13 +0100 (CET)",
            "from pyrite.rasen.tech (h175-177-042-159.catv02.itscom.jp\n\t[175.177.42.159])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5334856A;\n\tTue, 28 Feb 2023 07:19:12 +0100 (CET)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1677565155;\n\tbh=MQ/UeqjxbmUpMFUezVmW9Nl5eo6GyvFmt76vQ20c9M0=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=JMV1Br7ndeo1mV0ZT+EaJkXSQExHnhGtmXY5IAaVxEIzydx3JNGSQmdcftwbMZspT\n\tyaarJErsDg9SP66UDvFkJMUCyGZahtlweEmxDv2h0iHN7cceeMoiE2aydD/oIUKFQG\n\tjlbyJl02dd7P12KHtHl/BHGFlhTeTO+hwExr23X7gxsL6UvJcUQNXYF582slMNU45I\n\txpGQkhK3mW9b+LVXDjJ9+R3f7Al6oDa6Mb3ofrMVJl1T1HkK6qtiiaovM1aZdGQDAq\n\t1Qov6cmMRrTC9brgQHq+R8fCks/7jRAAMpGcUdaplJUVAnFFzTsoGNimf5zbEKNASQ\n\t2Wir9aPU8jI6w==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1677565153;\n\tbh=MQ/UeqjxbmUpMFUezVmW9Nl5eo6GyvFmt76vQ20c9M0=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=M9L/ZWJqH1r78YLDmOYniwQLeXTRsbkp2u89QbKn1bdxEFT9JeCDBX4hp7UGuSJ1u\n\tW9v7gqUrRr6RB/9nYnYDA/C2Njh/3tMOp5F2xmD5yWW+vwvsOlXyyGzwvfWGJnvBO4\n\t7+Xc7xtvEKPo87bo3KLTW4rZtGKhwdwQ+zzvtYx4="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"M9L/ZWJq\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 28 Feb 2023 15:18:59 +0900",
        "Message-Id": "<20230228061859.2957748-1-paul.elder@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.35.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2] utils: checkstyle.py: Don't run commit\n\ttitle checker on staged commits",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "<libcamera-devel.lists.libcamera.org>",
        "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>",
        "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>",
        "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>",
        "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "From": "Paul Elder via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Paul Elder <paul.elder@ideasonboard.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "When creating a new commit, there is no title, so the title checker\ncomplains that the title isn't compliant and the commit cannot be\ncreated if checkstyle is run as a pre-commit hook. Fix this by skipping\nthe title checker when run on staged changes.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n utils/checkstyle.py | 3 +++\n 1 file changed, 3 insertions(+)",
    "diff": "diff --git a/utils/checkstyle.py b/utils/checkstyle.py\nindex 78645410..eb62e4ab 100755\n--- a/utils/checkstyle.py\n+++ b/utils/checkstyle.py\n@@ -360,6 +360,9 @@ class TitleChecker(CommitChecker):\n     def check(cls, commit, top_level):\n         title = commit.title\n \n+        if isinstance(commit, StagedChanges):\n+            return []\n+\n         # Ignore release commits, they don't need a prefix.\n         if TitleChecker.release_regex.fullmatch(title):\n             return []\n",
    "prefixes": [
        "libcamera-devel",
        "v2"
    ]
}