From d1197f6bda931a41244b9a57789f8bef02a17654 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Thu, 19 Jan 2017 22:35:42 -0500 Subject: [PATCH 1/2] Add mention of version_slug parameter when using webhook Signed-off-by: Thanh Ha --- docs/webhooks.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/webhooks.rst b/docs/webhooks.rst index e912e15f529..a083e3d73f4 100644 --- a/docs/webhooks.rst +++ b/docs/webhooks.rst @@ -52,6 +52,10 @@ You could make this part of a hook using Git_, Subversion_, Mercurial_, or Bazaar_, perhaps through a simple script that accesses the build URL using ``wget`` or ``curl``. +The POST parameters available for webhooks: + + * version_slug: The build version to trigger build for (default: latest) + .. _Git: http://www.kernel.org/pub/software/scm/git/docs/githooks.html .. _Subversion: http://mikewest.org/2006/06/subversion-post-commit-hooks-101 .. _Mercurial: http://hgbook.red-bean.com/read/handling-repository-events-with-hooks.html From cb6466c3160cc4d8e61660219524ddbd62543d4e Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Thu, 26 Jan 2017 13:34:04 +0300 Subject: [PATCH 2/2] Tweak wording a bit --- docs/webhooks.rst | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/webhooks.rst b/docs/webhooks.rst index a083e3d73f4..ec81dcca0f8 100644 --- a/docs/webhooks.rst +++ b/docs/webhooks.rst @@ -48,14 +48,18 @@ look something along the lines of ``http://readthedocs.org/build/` Regardless of which revision control system you use, you can just hit this URL to kick off a rebuild. +The following parameters available to customize the behavior of custom webhooks: + +* ``'version_slug'``: The build version to trigger build for (defaults to ``'latest'``) + + Example:: + + $ curl -X POST --data "version_slug=$VERSION" https://readthedocs.org/build/$PROJECT_NAME + You could make this part of a hook using Git_, Subversion_, Mercurial_, or Bazaar_, perhaps through a simple script that accesses the build URL using ``wget`` or ``curl``. -The POST parameters available for webhooks: - - * version_slug: The build version to trigger build for (default: latest) - .. _Git: http://www.kernel.org/pub/software/scm/git/docs/githooks.html .. _Subversion: http://mikewest.org/2006/06/subversion-post-commit-hooks-101 .. _Mercurial: http://hgbook.red-bean.com/read/handling-repository-events-with-hooks.html