contrib / ciabot / INSTALLon commit Merge branch 'jc/maint-reflog-expire-clean-mark-typofix' (212ca64)
   1= Installation instructions =
   2
   3Two scripts are included.  The Python one (ciabot.py) is faster and
   4more capable; the shell one (ciabot.sh) is a fallback in case Python
   5gives your git hosting site indigestion. (I know of no such sites.)
   6
   7It is no longer necessary to modify the script in order to put it
   8in place; in fact, this is now discouraged. It is entirely
   9configurable with the following git config variables:
  10
  11ciabot.project = name of the project
  12ciabot.repo = name of the project repo for gitweb/cgit purposes
  13ciabot.xmlrpc  = if true, ship notifications via XML-RPC
  14ciabot.revformat = format in which the revision is shown
  15
  16The revformat variable may have the following values
  17raw -> full hex ID of commit
  18short -> first 12 chars of hex ID
  19describe -> describe relative to last tag, falling back to short
  20
  21ciabot.project defaults to the directory name of the repository toplevel.
  22ciabot.repo defaults to ciabot.project lowercased.
  23ciabot.xmlrpc defaults to True
  24ciabot.revformat defaults to 'describe'.
  25
  26This means that in the normal case you need not do any configuration at all,
  27however setting ciabot.project will allow the hook to run slightly faster.
  28
  29Once you've set these variables, try your script with -n to see the
  30notification message dumped to stdout and verify that it looks sane.
  31
  32To live-test these scripts, your project needs to have been registered with
  33the CIA site.  Here are the steps:
  34
  351. Open an IRC window on irc://freenode/commits or your registered
  36   project IRC channel.
  37
  382. Run ciabot.py and/or ciabot.sh from any directory under git
  39   control.
  40
  41You should see a notification on the channel for your most recent commit.
  42
  43After verifying correct function, install one of these scripts either
  44in a post-commit hook or in an update hook.
  45
  46In post-commit, run it without arguments. It will query for
  47current HEAD and the latest commit ID to get the information it
  48needs.
  49
  50In update, call it with a refname followed by a list of commits:
  51You want to reverse the order git rev-list emits because it lists
  52from most recent to oldest.
  53
  54/path/to/ciabot.py ${refname} $(git rev-list ${oldhead}..${newhead} | tac)