README

Some documentation

Build version: 0.1 - 871776b (master)

git-eventc

git-eventc is a small project aiming to bridge Git repositories to eventd for commit notification.
This project is only useful in a working eventd environment. Most people will need the eventd im plugin to act as an IRC commit bot.

Events

git-eventc will provide two events in the scm event group: commit and commit-group.
Here is the list of common data provided by both events:

commit

This event correspond to a single commit.
Here is the list of provided data:

commit-group

This event correspond to a group of commit. It will be generated if a push is adding a number of commits above a specified threshold (see --help).
Here is the list of provided data:

Example event file

(See eventd configuration for further information.)

For a commit event:

[Event]
Category = scm
Name = commit
[IMAccount freenode]
Message = ^B${project}^O: ^C03${author-name}^O ${repository-name}:^C07${branch}^O * ${id}: ${message} ^C05${url}^O ^C14${files}^0
Channels = #test;

For a commit-group event:

[Event]
Category = scm
Name = commit-group
[IMAccount freenode]
Message = ^B${project}^O: ^C03${pusher-name}^O pushed ${size} commits to ${repository-name}:^C07${branch}^O ^C05${url}^O
Channels = #test;

Executables

You can specify configuration either directly on the command-line, or in a file ~/.config/git-eventc.conf, in the key=value format. All keys must be in a [git-eventc] group and use the same name as their command-line argument.

git-eventc-post-receive

git-eventc-post-receive is a Git post-receive hook. See --help output for basic configuration.
You can use it directly as a post-receive hook or in a wrapper script. Please make sure stdin is fed correctly.

It will use configuration directly from Git. You should configure most of them in your system configuration (/etc/gitconfig).
Here is the list of used values:

It also has some basic support for Gitolite environment variables:

git-eventc-webhook

git-eventc-webhook is a tiny daemon that will listen HTTP POST based hook. These are provided by many Git host providers.
See --help output for its configuration.

Just run it or your server and point the WebHook to it. You can use the proxy support of your favorite web server if you prefer.
Direct TLS/SSL support is avaible.

git-eventc-webhook will split the URL path in two:

Here is the list of supported services.

Example URLs:

http://example.com:8080/TestProjectGroup
https://example.com:8080/TestProjectGroup/TestProject
https://example.com/webhook/TestProjectGroup/TestProject (behind Apache ProxyPass)

Secrets

git-eventc-webhook has secret support. In your GitHub WebHook configuration, you can specify a secret. This secret will be used to compute a signature of the hook payload, which is sent in the request header. git-eventc-webhook will compute the signature and compare it with the one in the request.

To specify secrets, you must use a configuration file. Here is the format:

Example:

[webhook-secrets]
Group1=secret
Group2=secret
Group3=other-secret