You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
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 eventdim plugin to act as an IRC commit bot.
Events
All events from git-eventc have the following common data:
repository-name: The name of the repository
repository-url: The URL of the repository
repository-namespace: The namespace (Gitlab/GitHub user/group) of the repository (if set)
project-group: The project group name (if set)
project: The project name, defaults torepository-name
url: An URL to see the change online (not for-deletion events)
extra-data: An hash table of extra data, see below for details
scm event category
git-eventc will provide events in thescm event category:commit,commit-group,branch-creation,branch-deletion,tag-creation,tag-deletion,push. Here is the list of common data provided by allscm events:
pusher-name: The name of the pusher
pusher-username: The username of the pusher (if available)
pusher-email: The email of the pusher (if available)
pusher-avatar-url: The avatar URL of the pusher (if available)
branch: The updated branch name (not fortag- events, and the relatedpush event)
commit
This event correspond to a single commit. Here is the list of provided data:
id: The commit id
subject: The commit subject (first line of message)
message: The commit message (with subject and footer tags stripped, only if not empty)
full-message: The full commit message (verbatim)
author-name: The name of the author
author-email: The email of the author
author-username: The username of the author (if available)
author-avatar-url: The avatar URL of the author (if available)
files: The list (as a string) of modified files, with some basic prefix detection Thepost-receive hook also detects file renames and copies if asked so.
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:
size: The number of commits in this push
branch-creation andbranch-deletion
This event correspond to the creation/deletion of a branch.
tag-creation andtag-deletion
This event correspond to the creation/deletion of a tag. Here is the list of additional data provided fortag-creation:
previous-tag: The latest tag in this tag history tree
If the tag is an annotated tag:
subject: The commit subject (first line of message)
message: The commit message (with subject and footer tags stripped, only if not empty)
full-message: The full commit message (verbatim)
author-name: The name of the author
author-email: The email of the author
author-username: The username of the author (if available)
author-avatar-url: The avatar URL of the author (if available)
push
This event correspond to a push.It will be generated after a set ofcommit events, or any of other events events. This event is useful for mirroring purpose.
issue event category
git-eventc will provide events in theissue event category:opening,closing,reopening. Here is the list of common data provided by allissue events:
id: The id/number of the bug report
title: The title of the report
tags: A list of tags/labels associated with the bug report (if available)
When available:
author-name: The name of the author
author-email: The email of the author (if available)
author-username: The username of the author (if available)
With some sources:
user-name: The name of the user triggering the event
user-email: The email of the user triggering the event (if available)
user-username: The username of the user triggering the event (if available)
merge-request event category
git-eventc will provide events in themerge-request event category:opening,closing,reopening,merge. Here is the list of common data provided by allmerge-request events:
id: The id/number of the MR
title: The title of the MR
branch: The branch the MR is against
tags: A list of tags/labels associated with the MR (if available)
When available:
author-name: The name of the author
author-email: The email of the author (if available)
author-username: The username of the author (if available)
With some sources:
user-name: The name of the user triggering the event
user-email: The email of the user triggering the event (if available)
user-username: The username of the user triggering the event (if available)
ci-build event category
git-eventc will provide events in theci-build event category:success,failure,error. Here is the list of common data provided by allci-build events:
id: The id/number of the build
branch: The branch the build is associated with
duration: The duration of the build
If the build is associated with a merge request:
mr-id: The id/number of the merge request
mr-title: The title of the merge request
nm-url: The URL of the merge request
Example event file
(See eventd configuration for further information.)
You can specify configuration either directly on the command-line, or in a file~/.config/git-eventc.conf, in thekey=value format.All keys must be in a[git-eventc] section 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 surestdin is fed correctly.
It will use configuration directly from Git.You should configure most of them in your system configuration (/etc/gitconfig). Configuration value names are prefixed bygit-eventc.. Here is the list of used values:
project-group: used asproject-group
project: used asproject, defaults torepository-name
repository: used asrepository-name (not meaningful in system configuration)
Several URL template strings:all of them have the${project-group} and${repository-name} tokens.
extra-data: all sub-values will be added asextra-data to the event
It also has support for Gitolite environment variables:
GL_USER: used aspusher-name
GL_REPO: used asrepository-name
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:
first part will be used asproject-group
second part (may contain slashes) will be used asproject The second part is optional and will default torepository-name
git-eventc-webhook will use the some parts of the query string:
secret: will be used for Travis CI until we get TLS signature verification
data[key]: all these will be added to the eventextra-data hash table
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: