get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 65243,
    "url": "http://patches.dpdk.org/api/patches/65243/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200128150256.14339-3-ciara.power@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20200128150256.14339-3-ciara.power@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200128150256.14339-3-ciara.power@intel.com",
    "date": "2020-01-28T15:02:56",
    "name": "[2/2] devtools: added stats print",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "596ab537398797378b38735729787c1902f16059",
    "submitter": {
        "id": 978,
        "url": "http://patches.dpdk.org/api/people/978/?format=api",
        "name": "Power, Ciara",
        "email": "ciara.power@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200128150256.14339-3-ciara.power@intel.com/mbox/",
    "series": [
        {
            "id": 8324,
            "url": "http://patches.dpdk.org/api/series/8324/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8324",
            "date": "2020-01-28T15:02:54",
            "name": "standardize devtools check scripts",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/8324/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/65243/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/65243/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 89904A04B3;\n\tTue, 28 Jan 2020 16:22:28 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 5BF8E1D14D;\n\tTue, 28 Jan 2020 16:22:14 +0100 (CET)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by dpdk.org (Postfix) with ESMTP id 8D9C71C43A\n for <dev@dpdk.org>; Tue, 28 Jan 2020 16:22:11 +0100 (CET)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 28 Jan 2020 07:13:52 -0800",
            "from silpixa00399953.ir.intel.com (HELO\n silpixa00399953.ger.corp.intel.com) ([10.237.222.53])\n by orsmga007.jf.intel.com with ESMTP; 28 Jan 2020 07:13:50 -0800"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.70,374,1574150400\"; d=\"scan'208\";a=\"217636685\"",
        "From": "Ciara Power <ciara.power@intel.com>",
        "To": "thomas@monjalon.net",
        "Cc": "dev@dpdk.org,\n\tCiara Power <ciara.power@intel.com>",
        "Date": "Tue, 28 Jan 2020 15:02:56 +0000",
        "Message-Id": "<20200128150256.14339-3-ciara.power@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200128150256.14339-1-ciara.power@intel.com>",
        "References": "<20200128150256.14339-1-ciara.power@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 2/2] devtools: added stats print",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "When all checks are completed on the specified commit logs, the script\nindicates if all are valid, or if there were some failures.\n\nSigned-off-by: Ciara Power <ciara.power@intel.com>\n---\n devtools/check-git-log.sh | 45 ++++++++++++++++++++++++++-------------\n 1 file changed, 30 insertions(+), 15 deletions(-)",
    "diff": "diff --git a/devtools/check-git-log.sh b/devtools/check-git-log.sh\nindex 22b2a6d84..2f7a9f344 100755\n--- a/devtools/check-git-log.sh\n+++ b/devtools/check-git-log.sh\n@@ -23,6 +23,7 @@ print_usage () {\n \n selfdir=$(dirname $(readlink -f $0))\n range=${1:-origin/master..}\n+failure=false\n \n if [ \"$range\" = '--help' ] ; then\n \tprint_usage\n@@ -61,7 +62,7 @@ bad=$(echo \"$headlines\" | grep --color=always \\\n \t-e ':[^ ]' \\\n \t-e ' :' \\\n \t| sed 's,^,\\t,')\n-[ -z \"$bad\" ] || printf \"Wrong headline format:\\n$bad\\n\"\n+[ -z \"$bad\" ] || { printf \"Wrong headline format:\\n$bad\\n\" && failure=true;}\n \n # check headline prefix when touching only drivers, e.g. net/<driver name>\n bad=$(for commit in $commits ; do\n@@ -79,7 +80,7 @@ bad=$(for commit in $commits ; do\n \t\techo \"$headline\" | grep -v \"^$drv\"\n \tfi\n done | sed 's,^,\\t,')\n-[ -z \"$bad\" ] || printf \"Wrong headline prefix:\\n$bad\\n\"\n+[ -z \"$bad\" ] || { printf \"Wrong headline prefix:\\n$bad\\n\" && failure=true;}\n \n # check headline label for common typos\n bad=$(echo \"$headlines\" | grep --color=always \\\n@@ -89,14 +90,14 @@ bad=$(echo \"$headlines\" | grep --color=always \\\n \t-e 'test-pmd' \\\n \t-e '^bond:' \\\n \t| sed 's,^,\\t,')\n-[ -z \"$bad\" ] || printf \"Wrong headline label:\\n$bad\\n\"\n+[ -z \"$bad\" ] || { printf \"Wrong headline label:\\n$bad\\n\" && failure=true;}\n \n # check headline lowercase for first words\n bad=$(echo \"$headlines\" | grep --color=always \\\n \t-e '^.*[[:upper:]].*:' \\\n \t-e ': *[[:upper:]]' \\\n \t| sed 's,^,\\t,')\n-[ -z \"$bad\" ] || printf \"Wrong headline uppercase:\\n$bad\\n\"\n+[ -z \"$bad\" ] || { printf \"Wrong headline uppercase:\\n$bad\\n\" && failure=true;}\n \n # check headline uppercase (Rx/Tx, VF, L2, MAC, Linux, ARM...)\n bad=$(echo \"$headlines\" | grep -E --color=always \\\n@@ -142,39 +143,41 @@ bad=$(echo \"$headlines\" | grep -E --color=always \\\n \t| grep \\\n \t-v ':.*\\<OCTEON\\ TX\\>' \\\n \t| sed 's,^,\\t,')\n-[ -z \"$bad\" ] || printf \"Wrong headline lowercase:\\n$bad\\n\"\n+[ -z \"$bad\" ] || { printf \"Wrong headline lowercase:\\n$bad\\n\" && failure=true;}\n \n # special case check for VMDq to give good error message\n bad=$(echo \"$headlines\" | grep -E --color=always \\\n \t-e '\\<(vmdq|VMDQ)\\>' \\\n \t| sed 's,^,\\t,')\n-[ -z \"$bad\" ] || printf \"Wrong headline capitalization, use 'VMDq':\\n$bad\\n\"\n+[ -z \"$bad\" ] || { printf \"Wrong headline capitalization, use 'VMDq':\\n$bad\\n\"\\\n+\t&& failure=true;}\n \n # check headline length (60 max)\n bad=$(echo \"$headlines\" |\n \tawk 'length>60 {print}' |\n \tsed 's,^,\\t,')\n-[ -z \"$bad\" ] || printf \"Headline too long:\\n$bad\\n\"\n+[ -z \"$bad\" ] || { printf \"Headline too long:\\n$bad\\n\" && failure=true;}\n \n # check body lines length (75 max)\n bad=$(echo \"$bodylines\" | grep -v '^Fixes:' |\n \tawk 'length>75 {print}' |\n \tsed 's,^,\\t,')\n-[ -z \"$bad\" ] || printf \"Line too long:\\n$bad\\n\"\n+[ -z \"$bad\" ] || { printf \"Line too long:\\n$bad\\n\" && failure=true;}\n \n # check starting commit message with \"It\"\n bad=$(for commit in $commits ; do\n \tfirstbodyline=$(git log --format='%b' -1 $commit | head -n1)\n \techo \"$firstbodyline\" | grep --color=always -ie '^It '\n done | sed 's,^,\\t,')\n-[ -z \"$bad\" ] || printf \"Wrong beginning of commit message:\\n$bad\\n\"\n+[ -z \"$bad\" ] || { printf \"Wrong beginning of commit message:\\n$bad\\n\"\\\n+\t&& failure=true;}\n \n # check tags spelling\n bad=$(echo \"$tags\" |\n \tgrep -v \"^$bytag [^,]* <.*@.*>$\" |\n \tgrep -v '^Fixes: [0-9a-f]\\{7\\}[0-9a-f]* (\".*\")$' |\n \tsed 's,^.,\\t&,')\n-[ -z \"$bad\" ] || printf \"Wrong tag:\\n$bad\\n\"\n+[ -z \"$bad\" ] || { printf \"Wrong tag:\\n$bad\\n\" && failure=true;}\n \n # check missing Coverity issue: tag\n bad=$(for commit in $commits; do\n@@ -183,7 +186,8 @@ bad=$(for commit in $commits; do\n \techo \"$body\" | grep -q '^Coverity issue:' && continue\n \tgit log --format='\\t%s' -1 $commit\n done)\n-[ -z \"$bad\" ] || printf \"Missing 'Coverity issue:' tag:\\n$bad\\n\"\n+[ -z \"$bad\" ] || { printf \"Missing 'Coverity issue:' tag:\\n$bad\\n\"\\\n+\t&& failure=true;}\n \n # check missing Bugzilla ID: tag\n bad=$(for commit in $commits; do\n@@ -192,14 +196,15 @@ bad=$(for commit in $commits; do\n \techo \"$body\" | grep -q '^Bugzilla ID:' && continue\n \tgit log --format='\\t%s' -1 $commit\n done)\n-[ -z \"$bad\" ] || printf \"Missing 'Bugzilla ID:' tag:\\n$bad\\n\"\n+[ -z \"$bad\" ] || { printf \"Missing 'Bugzilla ID:' tag:\\n$bad\\n\"\\\n+\t&& failure=true;}\n \n # check missing Fixes: tag\n bad=$(for fix in $fixes ; do\n \tgit log --format='%b' -1 $fix | grep -q '^Fixes: ' ||\n \t\tgit log --format='\\t%s' -1 $fix\n done)\n-[ -z \"$bad\" ] || printf \"Missing 'Fixes' tag:\\n$bad\\n\"\n+[ -z \"$bad\" ] || { printf \"Missing 'Fixes' tag:\\n$bad\\n\" && failure=true;}\n \n # check Fixes: reference\n IFS='\n@@ -214,11 +219,21 @@ bad=$(for fixtag in $fixtags ; do\n \tfi\n \tprintf \"$fixtag\" | grep -v \"^$good$\"\n done | sed 's,^,\\t,')\n-[ -z \"$bad\" ] || printf \"Wrong 'Fixes' reference:\\n$bad\\n\"\n+[ -z \"$bad\" ] || { printf \"Wrong 'Fixes' reference:\\n$bad\\n\" && failure=true;}\n \n # check Cc: stable@dpdk.org for fixes\n bad=$(for fix in $stablefixes ; do\n \tgit log --format='%b' -1 $fix | grep -qi '^Cc: *stable@dpdk.org' ||\n \t\tgit log --format='\\t%s' -1 $fix\n done)\n-[ -z \"$bad\" ] || printf \"Is it candidate for Cc: stable@dpdk.org backport?\\n$bad\\n\"\n+[ -z \"$bad\" ] || { printf \"Is it candidate for Cc: stable@dpdk.org backport?\\n$bad\\n\"\\\n+\t&& failure=true;}\n+\n+total=$(echo \"$commits\" | wc -l)\n+if $failure ; then\n+\tprintf \"\\nInvalid patch(es) found - checked $total patch\"\n+else\n+\tprintf \"\\n$total/$total valid patch\"\n+fi\n+[ $total -le 1 ] || printf 'es'\n+printf '\\n'\n",
    "prefixes": [
        "2/2"
    ]
}