get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 807454,
    "url": "http://patchwork.ozlabs.org/api/patches/807454/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/buildroot/patch/1504079652-15286-1-git-send-email-marcin.nowakowski@imgtec.com/",
    "project": {
        "id": 27,
        "url": "http://patchwork.ozlabs.org/api/projects/27/?format=api",
        "name": "Buildroot development",
        "link_name": "buildroot",
        "list_id": "buildroot.buildroot.org",
        "list_email": "buildroot@buildroot.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<1504079652-15286-1-git-send-email-marcin.nowakowski@imgtec.com>",
    "list_archive_url": null,
    "date": "2017-08-30T07:54:12",
    "name": "[v2] pkg-download: remove explicit PKG_VERSION from github helper",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "ba09954744914f5d5afe1de2148f7abb44d8dabc",
    "submitter": {
        "id": 69044,
        "url": "http://patchwork.ozlabs.org/api/people/69044/?format=api",
        "name": "Marcin Nowakowski",
        "email": "marcin.nowakowski@imgtec.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/buildroot/patch/1504079652-15286-1-git-send-email-marcin.nowakowski@imgtec.com/mbox/",
    "series": [
        {
            "id": 540,
            "url": "http://patchwork.ozlabs.org/api/series/540/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/buildroot/list/?series=540",
            "date": "2017-08-30T07:54:12",
            "name": "[v2] pkg-download: remove explicit PKG_VERSION from github helper",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/540/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/807454/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/807454/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<buildroot-bounces@busybox.net>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "buildroot@lists.busybox.net"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "buildroot@osuosl.org"
        ],
        "Authentication-Results": "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=busybox.net\n\t(client-ip=140.211.166.133; helo=hemlock.osuosl.org;\n\tenvelope-from=buildroot-bounces@busybox.net;\n\treceiver=<UNKNOWN>)",
        "Received": [
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xhyT26X79z9t1t\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 30 Aug 2017 17:54:29 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 7991189B92;\n\tWed, 30 Aug 2017 07:54:22 +0000 (UTC)",
            "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 7hlAIzPThVmL; Wed, 30 Aug 2017 07:54:20 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id B647D89B91;\n\tWed, 30 Aug 2017 07:54:20 +0000 (UTC)",
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 1C1F11C0437\n\tfor <buildroot@lists.busybox.net>;\n\tWed, 30 Aug 2017 07:54:20 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 14A048878C\n\tfor <buildroot@lists.busybox.net>;\n\tWed, 30 Aug 2017 07:54:20 +0000 (UTC)",
            "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id y-09wgTXo61v for <buildroot@lists.busybox.net>;\n\tWed, 30 Aug 2017 07:54:19 +0000 (UTC)",
            "from mailapp01.imgtec.com (mailapp01.imgtec.com [195.59.15.196])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 010FE88789\n\tfor <buildroot@buildroot.org>; Wed, 30 Aug 2017 07:54:18 +0000 (UTC)",
            "from hhmail02.hh.imgtec.org (unknown [10.100.10.20])\n\tby Forcepoint Email with ESMTPS id 469AE90BECA03\n\tfor <buildroot@buildroot.org>; Wed, 30 Aug 2017 08:54:14 +0100 (IST)",
            "from WR-NOWAKOWSKI.kl.imgtec.org (10.80.2.5) by\n\thhmail02.hh.imgtec.org (10.100.10.21) with Microsoft SMTP Server\n\t(TLS) id 14.3.294.0; Wed, 30 Aug 2017 08:54:16 +0100"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "From": "Marcin Nowakowski <marcin.nowakowski@imgtec.com>",
        "To": "<buildroot@buildroot.org>",
        "Date": "Wed, 30 Aug 2017 09:54:12 +0200",
        "Message-ID": "<1504079652-15286-1-git-send-email-marcin.nowakowski@imgtec.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "MIME-Version": "1.0",
        "X-Originating-IP": "[10.80.2.5]",
        "Cc": "Marcin Nowakowski <marcin.nowakowski@imgtec.com>",
        "Subject": "[Buildroot] [PATCH v2] pkg-download: remove explicit PKG_VERSION\n\tfrom github helper",
        "X-BeenThere": "buildroot@busybox.net",
        "X-Mailman-Version": "2.1.18-1",
        "Precedence": "list",
        "List-Id": "Discussion and development of buildroot <buildroot.busybox.net>",
        "List-Unsubscribe": "<http://lists.busybox.net/mailman/options/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=unsubscribe>",
        "List-Archive": "<http://lists.busybox.net/pipermail/buildroot/>",
        "List-Post": "<mailto:buildroot@busybox.net>",
        "List-Help": "<mailto:buildroot-request@busybox.net?subject=help>",
        "List-Subscribe": "<http://lists.busybox.net/mailman/listinfo/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "buildroot-bounces@busybox.net",
        "Sender": "\"buildroot\" <buildroot-bounces@busybox.net>"
    },
    "content": "Currently it is always required to add package version as an argument to\nthe github helper. Since the version is always defined as PKG_VERSION,\ndrop this argument and generate it automatically inside the helper\nroutine.\n\nThe github helper function is extended to support both 2 and 3 argument\nvariants (ie. either use the provided package version argument or\nautomatically substitute with PKG_VERSION if not available), which can\nmake the transition of the package files easier as well allows using the\n3-argument variant outside of package definitions.\n\nSigned-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com>\n---\nChanges:\n  v2\n    - update docs to include optional version argument\n    - use $(or $foo,...) instead of $(if $foo,$foo,...)\n---\n docs/manual/adding-packages-tips.txt | 4 +++-\n package/pkg-download.mk              | 4 ++--\n 2 files changed, 5 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/docs/manual/adding-packages-tips.txt b/docs/manual/adding-packages-tips.txt\nindex 19577fa..8caf2b9 100644\n--- a/docs/manual/adding-packages-tips.txt\n+++ b/docs/manual/adding-packages-tips.txt\n@@ -138,7 +138,7 @@ past, the 'github' helper function should be used as shown below.\n ------------------------\n # Use a tag or a full commit ID\n FOO_VERSION = v1.0\n-FOO_SITE = $(call github,<user>,<package>,$(FOO_VERSION))\n+FOO_SITE = $(call github,<user>,<package>[,<version>])\n ------------------------\n \n .Notes\n@@ -147,6 +147,8 @@ FOO_SITE = $(call github,<user>,<package>,$(FOO_VERSION))\n   Buildroot (e.g.: +foo-f6fb6654af62045239caed5950bc6c7971965e60.tar.gz+),\n   so it is not necessary to specify it in the +.mk+ file.\n - When using a commit ID as version, you should use the full 40 hex characters.\n+- +version+ parameter is optional and should only be specified if anything\n+  other than FOO_VERSION needs to be used\n \n If the package you wish to add does have a release section on GitHub, the\n maintainer may have uploaded a release tarball, or the release may just point\ndiff --git a/package/pkg-download.mk b/package/pkg-download.mk\nindex fbbc2d7..7489fca 100644\n--- a/package/pkg-download.mk\n+++ b/package/pkg-download.mk\n@@ -52,8 +52,8 @@ notdomain = $(patsubst $(call domain,$(1),$(2))$(call domainseparator,$(2))%,%,$\n # default domainseparator is /, specify alternative value as first argument\n domainseparator = $(if $(1),$(1),/)\n \n-# github(user,package,version): returns site of GitHub repository\n-github = https://github.com/$(1)/$(2)/archive/$(3)\n+# github(user,package[,version]): returns site of GitHub repository\n+github = https://github.com/$(1)/$(2)/archive/$(or $(3),$($(call UPPERCASE,$(pkgname))_VERSION)))\n \n # Expressly do not check hashes for those files\n # Exported variables default to immediately expanded in some versions of\n",
    "prefixes": [
        "v2"
    ]
}