gachette

Webhook server for Gitlab, Github and Gitea to run arbitrary commands.

Until today Gachette doesn't recognize any webhook variables (i.e transforming each element from the webhook into environment variables).

You can, for example, use Gachette for this kind of purposes:

Features

Planned features

Installation

You need to create the binary like this:

shards install
make

As a result, the executable bin/gachette will appear.

Configuration

Gachette needs a INI formed configuration file. You can get an example in the gachette.ini.example file.

Here is an example:

[The_name_I_want_for_the_project_in_gachette]
service = github
namespace = blankoworld/gachette
key = myPrivateSecretKey
command = ls .

With the last configuration we know that:

Gachette use each section as a project.

Each project contains all project options.

key is not mandatory.

Gachette uses either command or scriptfile as action to execute while receiving a webhook.

scriptfile should contains the path of an executable script file.

Usage

Launch the bin/gachette binary:

KEMAL_ENV=production gachette -p 3030

Which means:

That's all!

Parameters

Gachette use gachette.ini configuration file as default one.

Development

Webhooks documentation

Tests

Pretty testing can be launched via these commands:

shards install
KEMAL_ENV=test crystal spec

OR:

shards install
make test

Documentation

As for Crystal language, just generate the documentation like this:

crystal docs

OR:

make doc

Contributing

  1. Fork it (https://github.com/blankoworld/gachette/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors