Show a patch.

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

{
    "id": 21531,
    "url": "https://patchwork.libcamera.org/api/patches/21531/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/21531/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/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": "<20241007191403.26881-1-laurent.pinchart@ideasonboard.com>",
    "date": "2024-10-07T19:14:03",
    "name": "hooks: pre-push: Verify that co-authors have a SoB line",
    "commit_ref": "fc761ffe499bed5ac5a9d2313b87be85f4d41a71",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "142bbdaa5acf36b8e525216b533b5682773ab47b",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/21531/mbox/",
    "series": [
        {
            "id": 4662,
            "url": "https://patchwork.libcamera.org/api/series/4662/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4662",
            "date": "2024-10-07T19:14:03",
            "name": "hooks: pre-push: Verify that co-authors have a SoB line",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/4662/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/21531/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/21531/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 94324BD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  7 Oct 2024 19:14:13 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AC4CC6353A;\n\tMon,  7 Oct 2024 21:14:12 +0200 (CEST)",
            "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 AECF56351F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  7 Oct 2024 21:14:10 +0200 (CEST)",
            "from pendragon.ideasonboard.com (unknown [132.205.230.14])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E745675A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  7 Oct 2024 21:12:33 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"t1RRrfJM\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1728328354;\n\tbh=kLuxvkTCkSPrBlnr8dLdCpUQr6zsEB4m/bvwRTQ9giE=;\n\th=From:To:Subject:Date:From;\n\tb=t1RRrfJMRAc8z4EG2p11VSOo4HzZLK0wVuUHiAHlapr1eHKVz+joRexBRngb3e3y+\n\tobeadqduAwxIH3FeXntRDzOV78Pex4apfMjXnQxPMzXcYneGuAYa1L0vULlgf2X37w\n\tYhxzmeFHwLaBN1GjmRPZsHjUE+JOK66XgOA1BtWk=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Subject": "[PATCH] hooks: pre-push: Verify that co-authors have a SoB line",
        "Date": "Mon,  7 Oct 2024 22:14:03 +0300",
        "Message-ID": "<20241007191403.26881-1-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.45.2",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The Co-developed-by tag must be followed by a corresponding SoB line.\nEnforce this rule in the git pre-push hook.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n utils/hooks/pre-push | 11 ++++++++++-\n 1 file changed, 10 insertions(+), 1 deletion(-)\n\n\nbase-commit: a7d573df53ff2fe2edaaf4c11a269f12b1a9e305",
    "diff": "diff --git a/utils/hooks/pre-push b/utils/hooks/pre-push\nindex 9918b2861705..68dcbd0cccc8 100755\n--- a/utils/hooks/pre-push\n+++ b/utils/hooks/pre-push\n@@ -68,7 +68,7 @@ do\n \t\tfi\n \n \t\t# 2. The commit message shall have Signed-off-by lines\n-\t\t# corresponding the committer and the author.\n+\t\t# corresponding the committer, author, and all co-developers.\n \t\tcommitter=$(echo \"$msg\" | grep '^committer ' | head -1 | \\\n \t\t\t\tcut -d ' ' -f 2- | rev | cut -d ' ' -f 3- | rev)\n \t\tif ! echo -E \"$msg\" | grep -F -q \"Signed-off-by: ${committer}\"\n@@ -85,6 +85,15 @@ do\n \t\t\terrors=$((errors+1))\n \t\tfi\n \n+\t\twhile read -r codev\n+\t\tdo\n+\t\t\tif ! echo -E \"$msg\" | grep -F -q \"Signed-off-by: ${codev}\"\n+\t\t\tthen\n+\t\t\t\techo >&2 \"Missing co-developer '${codev}' Signed-off-by in commit $commit\"\n+\t\t\t\terrors=$((errors+1))\n+\t\t\tfi\n+\t\tdone < <(echo \"$msg\" | grep '^Co-developed-by: ' | cut -d ' ' -f 2-)\n+\n \t\t# 3. A Reviewed-by or Acked-by is required.\n \t\tif ! echo -E \"$msg\" | grep -q '^\\(Reviewed\\|Acked\\)-by: '\n \t\tthen\n",
    "prefixes": []
}