* bot_name : nom du bot sur Discord (remplace le nom défini dans Discord)
* bot_avatar : image de profil du bot sur Discord (remplace l'image défini dans Discord), mettre une URL absolue
Il suffit ensuite de mettre le fichier PHP (*gitscord_webhook.php*, mais vous pouvez le renommer à votre convenance) dans un des dossiers servis par votre serveur HTTP(S), avec le fichier *gitscord_webhook_config.json* (ne pas renommer, ou en changer le nom dans le script PHP).
Il suffit ensuite de mettre le fichier PHP (*gitscord_webhook.php*, mais vous pouvez le renommer à votre convenance) dans un des dossiers servis par votre serveur HTTP(S), avec le fichier *gitscord_webhook_config.json*juste a côté (ne pas renommer, ou changer le nom dans le script PHP également).
Enfin dans Gitlab, menus "Settings" puis "Integrations" d'un projet, indiquer l'URL du fichier PHP et choisissez les événements à afficher dans Discord.
@ -93,4 +93,47 @@ Para soportar el desarrollo de este proyecto, puede particularmente abrir issues
* los fallos de seguridad que nota (con el label *Security*)
* ideas de nuevas funcionalidades (con el label *Feature*)
# GitScord webhook (English)
# GitScord webhook (English)
GitScord is a middleman webhook between Gitlab and Discord, in order to have nicer to read messages than messages auto-generated by Gitlab.
## Features
GitScord use the whole formatting possibilities of Discord, to make the messages both complete and easily readable.
Existing features :
* support commits, tags, issues, notes, merge requests
* multilingual
* control bot aspects in Discord
* 100% PHP, straightforward installation with few dependencies
In development features :
* support job, pipeline, wikipage
* less verbose mode
## Installation
### Requirement
GitScord is entirely written in PHP. As the *JSON* module is in PHPcore, the only requirement is to have installed PHP >= 5.2.0 or PHP >= 7, compiled with the *curl* module.
The server on which is put the script have to be reachable in HTTP(S) from your Gitlab, and this server need to be able to make a HTTP(S) request to *discordapp.com*.
### Configuration
First, create a webhook in the parameters of your Discord server (please refer to the help page on official Discord website if needed).
Then create a configuration file *gitscord_webhook_config.json*.
You can find help in the example files *gitscord_webhook_config.json.exemple.full* and *gitscord_webhook_config.json.exemple.minimal*, which respectively contains the full parameters list and the compulsory parameters list.
Definition of the parameters :
* discord_url : address of the Discord-provided webhook
* language : language of messages sent by the bot, choose between en, es and fr
* bot_name : name of the bot on Discord (override the name set in Discord)
* bot_avatar : avatar image of the bot on Discord (override the image set in Discord), put an absolute URL
Put the PHP file (*gitscord_webhook.php*, but you can rename it as you want) in a folder of your HTTP(S) server, with the file *gitscord_webhook_config.json* in the same folder (do not rename it, or change the name in the PHP script too).
Finally, on Gitlab in menus "Settings" and "Integrations" of a project, put theURL of the PHP file and choose the event you need to notified of in Discord.
## Contributions
To be involved in the development of this project, you can in particular open issues of Gitlab for :
* the bugs you noticed using it
* security problem you found (with the label *Security*)
* ideas of new features (with the label *Feature*)