No description
  • Go 91.4%
  • Dockerfile 5%
  • Makefile 3.1%
  • Shell 0.5%
Find a file
Jonathan Lopez f77c4ae090
Merge pull request #35 from ClubCedille/detect-mentions-functionality
- Adds mentionning roles functionality
2021-09-23 19:43:51 -04:00
.githooks Added precommit hook 2021-01-19 13:14:11 -05:00
.github/workflows upgrade go to 1.16 2021-09-18 14:16:06 -04:00
api trying something to fix package error 2021-09-18 13:46:53 -04:00
img initial documentation on app configuration 2021-05-07 23:40:15 -04:00
manifests Remove runAsNonRoot (#29) 2021-06-04 22:58:11 -04:00
.dockerignore Feature/base project setup (#7) 2021-01-12 21:02:00 -05:00
.editorconfig Feature/base project setup (#7) 2021-01-12 21:02:00 -05:00
.gitignore Ajout d'un module de logging (#19) 2021-02-20 02:33:46 -05:00
docker-compose.yml Feature/base project setup (#7) 2021-01-12 21:02:00 -05:00
Dockerfile Feature/manifests: Adds Kubernetes Manifest (#24) 2021-05-28 14:06:48 -04:00
go.mod Made changes so that test files pass 2021-09-18 12:51:02 -04:00
go.sum got rid of unused packages 2021-09-18 12:56:19 -04:00
kustomization.yml Update kustomize version to v1.0.7 (#32) 2021-06-26 09:22:04 -04:00
LICENSE Initial commit 2020-11-10 20:42:33 -05:00
main.go Ajout d'un module de logging (#19) 2021-02-20 02:33:46 -05:00
Makefile Mattermost2discord forwards text to Discord 2021-01-24 21:14:52 -05:00
mm2disc_uml.plantuml Update README.md 2021-05-29 13:39:24 -04:00
README.md Update README.md 2021-05-31 10:43:58 -04:00

mattermost2discord

Go Report Card

REST API that forwards messages from Mattermost to Discord, using a callback.

Depencencies

Usage

With Kubernetes

To use mattermost2discord with Kubernetes, simply declare a kustomization.yml configuration file like so:

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- https://github.com/ClubCedille/mattermost2discord?ref=v1.0.0 # Example release

Then, you can build your kustomize configuration like this:

$ kustomize build
...

Development

Running the API - using Docker

To run the API, you can use the following command:

$ make docker
...

The service will then run on the port 3000.

Running the API - without Docker

You can also run the API without Docker, but make sure the PORT environment variable is set on your machine to something like 3000 or any other port available on your computer. You can run it with the following command:

$ make run
...

Running the tests

To run the tests, simply execute this command:

$ make test
...

Git hooks

To share the same versioned across the team, execute this command:

$ git config core.hooksPath .githooks

Configuration

Mattermost2Discord

1. Webhook set up

Set up an outgoing webhook from mattermost with a specified channel that delivers the payload to your web service with the following option selected :

Mattermost webhook Config

Keep the token generated by the creation of the webhook.

2. Set up Discord bot

Create your discord bot, invite it to your server and keep the token provided.

3. Set up environnement variables

Set all of the following env variables :

  • DISCORD_TOKEN : Discord bot token
  • MATTERMOST_TOKEN : Mattermost Webhook token
  • DISCORD_CHANNEL : Discord Channel ID which will foward messages
  • TRIGGER_WORD_MATTERMOST : Trigger word to foward your message from mattermost to discord.
  • PORT: The port on which the server will listen