/usr/share/monotone/hooks/monotone-ciabot.lua is in monotone-extras 1.1-4+deb8u2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | -- Copyright (C) Nathaniel Smith <njs@pobox.com>
-- Timothy Brownawell <tbrownaw@gmail.com>
-- Thomas Moschny <thomas.moschny@gmx.de>
-- Richard Levitte <richard@levitte.org>
-- Licensed under the MIT license:
-- http://www.opensource.org/licenses/mit-license.html
-- I.e., do what you like, but keep copyright and there's NO WARRANTY.
--
-- CIA bot client for monotone, Lua part. This works in conjuction with
-- ciabot_monotone_hookversion.py.
-- You MUST assign the path to the corresponding python script as a string
-- to the variable ciabot_python_script. Without it, this hook will do
-- nothing but complain.
do
push_hook_functions({
revision_received =
function (rid, rdat, certs)
-- Configure with the path to the
-- corresponding python script
if not ciabot_python_script then
print "Please configure by defining 'ciabot_python_script' with the path to the python script monotone_ciabot.py"
return "continue",nil
end
local branch, author, changelog
for i, cert in pairs(certs)
do
if (cert.name == "branch") then
branch = cert.value
end
if (cert.name == "author") then
author = cert.value
end
if (cert.name == "changelog") then
changelog = cert.value
end
end
wait(spawn(ciabot_python_script,
get_confdir(), rid,
branch, author, changelog,
rdat))
return "continue",nil
end
})
end
|