]> git.ozlabs.org Git - patchwork/commitdiff
docs: Add a pointer to the git post-receive hook
authorCarl Worth <cworth@cworth.org>
Wed, 11 Dec 2013 18:46:28 +0000 (10:46 -0800)
committerJeremy Kerr <jk@ozlabs.org>
Wed, 29 Jan 2014 09:57:17 +0000 (17:57 +0800)
I had to stumble upon this feature before I realized it was here
inside the tools directory all along. This documentation should make
it easier for the next person coming along looking for a patchwork git
hook.

Signed-off-by: Carl Worth <cworth@cworth.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
docs/INSTALL

index 91c60815e575ff4f5dec5056deb327b02c4d1300..2c1a0a95593ba4ed2fb27454557f92d9d3e3b151 100644 (file)
@@ -217,6 +217,23 @@ fastcgi:
 
      sudo -u nobody /srv/patchwork/apps/patchwork/bin/parsemail.sh < mail
 
+7. Optional: Configure your VCS to automatically update patches
+
+    The tools directory of the patchwork distribution contains a file
+    named post-receive.hook which is an example git hook that can be
+    used to automatically update patches to the Accepted state when
+    corresponding comits are pushed via git.
+
+    To install this hook, simply copy it to the .git/hooks directory on
+    your server, name it post-receive, and make it executable.
+
+    This sample hook has support to update patches to different states
+    depending on which branch is being pushed to. See the STATE_MAP
+    setting in that file.
+
+    If you are using a system other than git, you can likely write a
+    similar hook using pwclient to update patch state. If you do write
+    one, please contribute it.
 
 Some errors: