Patch Detail
Show a patch.
GET /api/patches/20324/?format=api
{ "id": 20324, "url": "https://patchwork.libcamera.org/api/patches/20324/?format=api", "web_url": "https://patchwork.libcamera.org/patch/20324/", "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": "<20240614155718.10902-1-kieran.bingham@ideasonboard.com>", "date": "2024-06-14T15:57:18", "name": "lint: Add pre-merge checks using pre-push hook", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "79bd52fbaeda027bd7b71b05fe50db4eecf1d0e6", "submitter": { "id": 4, "url": "https://patchwork.libcamera.org/api/people/4/?format=api", "name": "Kieran Bingham", "email": "kieran.bingham@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/20324/mbox/", "series": [ { "id": 4397, "url": "https://patchwork.libcamera.org/api/series/4397/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4397", "date": "2024-06-14T15:57:18", "name": "lint: Add pre-merge checks using pre-push hook", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4397/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/20324/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/20324/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 CFBEBBD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 14 Jun 2024 15:57:25 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DDF1865461;\n\tFri, 14 Jun 2024 17:57:24 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BDFFD61A2A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 14 Jun 2024 17:57:22 +0200 (CEST)", "from Monstersaurus.local\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BA0172C5;\n\tFri, 14 Jun 2024 17:57:07 +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=\"E85ZyRnX\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1718380627;\n\tbh=0U38dB+Od5hmDlb/LPXDMZi9zLQBdljoSKVjnasnbkY=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=E85ZyRnXmEmNfmEq2HhgDexUdQagrrDvQh5Vhpz5HDP7wp3ANrpv1/BsREKRE0vGa\n\tINXQxVWpNBU+oxe7BBYfzKs+kJPI+w9DODHNp4x52RGUh1IrsSNaVgH2J8Z/veuxnH\n\tM+PoseX7IxbK+1W/HkC4E9CCPyEzQ8nS+QTiSD0Y=", "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "To": "libcamera devel <libcamera-devel@lists.libcamera.org>", "Cc": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "Subject": "[PATCH] lint: Add pre-merge checks using pre-push hook", "Date": "Fri, 14 Jun 2024 16:57:18 +0100", "Message-Id": "<20240614155718.10902-1-kieran.bingham@ideasonboard.com>", "X-Mailer": "git-send-email 2.34.1", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "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": "Wrap the existing libcamera pre-push hook into a lint task to make sure\nthat the rules we apply to merging are conveyed as part of the CI jobs.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n .gitlab-ci/lint-pre-push.sh | 27 +++++++++++++++++++++++++++\n gitlab-ci.yml | 16 +++++++++++++++-\n 2 files changed, 42 insertions(+), 1 deletion(-)\n create mode 100755 .gitlab-ci/lint-pre-push.sh", "diff": "diff --git a/.gitlab-ci/lint-pre-push.sh b/.gitlab-ci/lint-pre-push.sh\nnew file mode 100755\nindex 000000000000..8a4283cc0f15\n--- /dev/null\n+++ b/.gitlab-ci/lint-pre-push.sh\n@@ -0,0 +1,27 @@\n+#!/bin/bash\n+\n+# SPDX-License-Identifier: GPL-2.0-or-later\n+# SPDX-FileCopyrightText: © 2023 Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n+#\n+# Pre-merge checks\n+\n+set -e\n+\n+source \"$(dirname \"$0\")/lib.sh\"\n+\n+libcamera_premerge() {\n+\techo \"Running Pre-merge checks for $CI_COMMIT_REF_NAME ($base..$CI_COMMIT_SHA)\"\n+\n+\t# Wrap parameters as git would send them to the pre-push hooks directly.\n+\techo \"$CI_COMMIT_REF_NAME $CI_COMMIT_SHA refs/heads/integration/pre-push-lint-test $base\" \\\n+\t\t| ./utils/hooks/pre-push origin \"$CI_DEFAULT_BRANCH\"\n+}\n+\n+base=$(find_base origin/$CI_DEFAULT_BRANCH $CI_COMMIT_SHA)\n+\n+if [[ $base == $CI_COMMIT_SHA ]] ; then\n+\techo \"No commit to test, skipping\"\n+\texit 0\n+fi\n+\n+run libcamera_premerge\ndiff --git a/gitlab-ci.yml b/gitlab-ci.yml\nindex 50b81e591458..d9b31ec8259e 100644\n--- a/gitlab-ci.yml\n+++ b/gitlab-ci.yml\n@@ -311,7 +311,7 @@ build-package:cros:\n dotenv: env\n \n # ------------------------------------------------------------------------------\n-# Lint stage - Run checkstyle.py\n+# Lint stage - Run checkstyle.py and check merge suitability\n # ------------------------------------------------------------------------------\n \n lint:\n@@ -330,6 +330,20 @@ lint:\n script:\n - $CI_PROJECT_DIR/.gitlab-ci/lint-libcamera.sh\n \n+merge-check:\n+ extends:\n+ - .fdo.distribution-image@debian\n+ - .history-jobs\n+ - .libcamera-ci.debian:12\n+ - .libcamera-ci.scripts\n+ stage: lint\n+ needs:\n+ - job: container-debian:12\n+ artifacts: false\n+ script:\n+ - $CI_PROJECT_DIR/.gitlab-ci/lint-pre-push.sh\n+\n+\n # ------------------------------------------------------------------------------\n # Test stage - Run unit tests and hardware tests\n # ------------------------------------------------------------------------------\n", "prefixes": [] }