diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2016-12-18 14:42:20 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2016-12-18 14:42:20 +0000 |
commit | 94b68cfe910f1f6560f63c15f7208a282fd656c1 (patch) | |
tree | e0df304d759310d906463f22d763ab4ebeda4c3e /example | |
parent | 431c07ef334603630ac7af9b01c0c8ef9389772f (diff) | |
download | gitano-94b68cfe910f1f6560f63c15f7208a282fd656c1.tar.gz |
Remove obsolete CIA hook (CIA has been dead for a while now)
Diffstat (limited to 'example')
-rw-r--r-- | example/global-hooks/cia-notify.post-receive.lua | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/example/global-hooks/cia-notify.post-receive.lua b/example/global-hooks/cia-notify.post-receive.lua deleted file mode 100644 index 18408ce..0000000 --- a/example/global-hooks/cia-notify.post-receive.lua +++ /dev/null @@ -1,45 +0,0 @@ --- cia-notify.post-receive.lua --- --- Example post-receive global hook which notifies cia.vc on ref updates --- which match any of the patterns provided by the project. --- --- It notifies CIA.vc *before* passing the updates on to the project hook. --- --- Copyright 2012 Daniel Silverstone <dsilvers@digital-scurf.org> --- --- This is an example which is part of Gitano. --- - -local project_hook, repo, updates = ... - -local empty = "0000000000000000000000000000000000000000" - -local cia_project = repo:get_config("cia.project") -if cia_project then - local refpatterns = repo:get_config_list("cia.branches") - if not refpatterns or #refpatterns == 0 then - refpatterns = { ".*" } - end - for i = 1, #refpatterns do - refpatterns[i] = "^refs/heads/" .. refpatterns[i] - end - for ref, details in pairs(updates) do - if details.newsha ~= empty and details.oldsha ~= empty then - local refmatched = false - for i = 1, #refpatterns do - if ref:match(refpatterns[i]) then - refmatched = true - break - end - end - if refmatched then - log.chat("Informing CIA of commits on", ref:sub(12)) - cia.inform_commits(cia_project, ref:sub(12), repo, - details.oldsha, details.newsha) - end - end - end -end - --- Finally, chain to the project hook -return project_hook(repo, updates) |