get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 132190,
    "url": "https://patches.dpdk.org/api/patches/132190/?format=api",
    "web_url": "https://patches.dpdk.org/project/ci/patch/20230929083443.9925-1-pbhagavatula@marvell.com/",
    "project": {
        "id": 5,
        "url": "https://patches.dpdk.org/api/projects/5/?format=api",
        "name": "CI",
        "link_name": "ci",
        "list_id": "ci.dpdk.org",
        "list_email": "ci@dpdk.org",
        "web_url": "",
        "scm_url": "git://dpdk.org/tools/dpdk-ci",
        "webscm_url": "https://git.dpdk.org/tools/dpdk-ci/",
        "list_archive_url": "https://inbox.dpdk.org/ci",
        "list_archive_url_format": "https://inbox.dpdk.org/ci/{}",
        "commit_url_format": ""
    },
    "msgid": "<20230929083443.9925-1-pbhagavatula@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/ci/20230929083443.9925-1-pbhagavatula@marvell.com",
    "date": "2023-09-29T08:34:43",
    "name": "pw_maintainers_cli: enhance tree selection",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "6c8609e5680e278bdf47337e8369731748cea7e0",
    "submitter": {
        "id": 1183,
        "url": "https://patches.dpdk.org/api/people/1183/?format=api",
        "name": "Pavan Nikhilesh Bhagavatula",
        "email": "pbhagavatula@marvell.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/ci/patch/20230929083443.9925-1-pbhagavatula@marvell.com/mbox/",
    "series": [
        {
            "id": 29692,
            "url": "https://patches.dpdk.org/api/series/29692/?format=api",
            "web_url": "https://patches.dpdk.org/project/ci/list/?series=29692",
            "date": "2023-09-29T08:34:43",
            "name": "pw_maintainers_cli: enhance tree selection",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/29692/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/132190/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/132190/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<ci-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id E65E142671;\n\tFri, 29 Sep 2023 10:35:33 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id E014E402E7;\n\tFri, 29 Sep 2023 10:35:33 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id D95BD402E6\n for <ci@dpdk.org>; Fri, 29 Sep 2023 10:35:31 +0200 (CEST)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 38T273XA031700; Fri, 29 Sep 2023 01:35:29 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3td7y6vgek-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Fri, 29 Sep 2023 01:35:27 -0700",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48;\n Fri, 29 Sep 2023 01:34:51 -0700",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend\n Transport; Fri, 29 Sep 2023 01:34:51 -0700",
            "from MININT-80QBFE8.corp.innovium.com (MININT-80QBFE8.marvell.com\n [10.28.164.106])\n by maili.marvell.com (Postfix) with ESMTP id 102EA3F7073;\n Fri, 29 Sep 2023 01:34:48 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : mime-version : content-transfer-encoding :\n content-type; s=pfpt0220; bh=yl3sd625AriMvvdsXO/GmAgPl4fIO2CEoaGZxumgH4c=;\n b=LRmZECENeQFfR8aw6RP07YqFXvzntdN9paSOuuCm/7/JPZOwGdJ/bPoYM30apezwAjKg\n RX1aHEv/fMFfyjWQgfSZxJzKqks7X+ogwCfT5irdQjBsVmCctm+j4Bj5+/O5gowHu+xx\n fok+SlJTCkGs9mMiOyZ5SGnFsyHk54Fo8OXwqZ1TwfPbrnwz8lqokzu5o9ShzU5rkE95\n Qe0oP43Wv/Up4ym62g+6GeO2Lxer8MZbRPXfxF5NOuhQPqXA4uI4YZ8OKnWL99aaQFPb\n Kj/hIAQ0ynH6lDSEBXSM8yod2TBCE/BcZxif6QHPVFSIyLKIlpyE9vZLSDg3ijodwRhF Xg==",
        "From": "<pbhagavatula@marvell.com>",
        "To": "<jerinj@marvell.com>, <alialnu@nvidia.com>, <aconole@redhat.com>",
        "CC": "<ci@dpdk.org>, Pavan Nikhilesh <pbhagavatula@marvell.com>",
        "Subject": "[PATCH] pw_maintainers_cli: enhance tree selection",
        "Date": "Fri, 29 Sep 2023 14:04:43 +0530",
        "Message-ID": "<20230929083443.9925-1-pbhagavatula@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "heITfEAuwDCzYaQqRvZTs9PcCv2VKjsL",
        "X-Proofpoint-GUID": "heITfEAuwDCzYaQqRvZTs9PcCv2VKjsL",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26\n definitions=2023-09-29_07,2023-09-28_03,2023-05-22_02",
        "X-BeenThere": "ci@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK CI discussions <ci.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/ci>,\n <mailto:ci-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/ci/>",
        "List-Post": "<mailto:ci@dpdk.org>",
        "List-Help": "<mailto:ci-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/ci>,\n <mailto:ci-request@dpdk.org?subject=subscribe>",
        "Errors-To": "ci-bounces@dpdk.org"
    },
    "content": "From: Pavan Nikhilesh <pbhagavatula@marvell.com>\n\nWhen longest prefix match doesnt find a suitable tree, pick the\ntree which has the highest modified file count instead of defauting\nto main tree.\n\nSigned-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>\n---\n tools/pw_maintainers_cli.py | 6 +++++-\n 1 file changed, 5 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/tools/pw_maintainers_cli.py b/tools/pw_maintainers_cli.py\nindex c7b5ba0..4aa46ae 100755\n--- a/tools/pw_maintainers_cli.py\n+++ b/tools/pw_maintainers_cli.py\n@@ -46,6 +46,7 @@ import re\n import argparse\n import fnmatch\n \n+from collections import Counter\n from requests.exceptions import HTTPError\n \n from git_pw import config\n@@ -276,6 +277,7 @@ class Maintainers(object):\n           dpdk-next-crypto + dpdk-next-virtio = dpdk\n           dpdk-next-net-intel + dpdk-next-net-mlx = dpdk-next-net\n         \"\"\"\n+        highest_tree = Counter(tree_list).most_common(1)[0][0]\n         # Make sure the list is unique.\n         tree_list = list(set(tree_list))\n \n@@ -287,7 +289,9 @@ class Maintainers(object):\n             os.path.commonprefix(_tree_list).rstrip('-').replace(\n                     'dpdk-next-net-virtio', 'dpdk-next-virtio')\n         # There is no 'dpdk-next' named tree.\n-        if common_prefix.endswith('dpdk-next') or common_prefix.endswith('/'):\n+        if common_prefix.endswith('dpdk-next'):\n+            common_prefix = highest_tree\n+        elif common_prefix.endswith('/'):\n             common_prefix = 'git://dpdk.org/dpdk'\n         return common_prefix\n \n",
    "prefixes": []
}