Giter Club home page Giter Club logo

mattermost-integration-gitlab's Introduction

GitLab Integration Service for Mattermost

Build Status Coverage Status

This integrations service supports the following events from a GitLab repository into specific Mattermost channels by formatting output from GitLab's outgoing webhooks to Mattermost's incoming webhooks.

Event Enabled by default Comments
push Can be enabled with the flag --push
tag Can be enabled with the flag --tag
issue Can be disabled with the flag --no-issue
comment Can be disabled with the flag --no-comment
merge request Can be disabled with the flag --no-merge-request
build Can be disabled with the flag --no-ci

Not currently supported: wiki page events.

This service is currently tested against the events sent by Gitlab 8.14.x.

Requirements

To run this integration you need:

  1. A server running some sort of Linux and Python (tested with versions 2.7, 3.3, 3.4, 3.5).
  2. A GitLab account with a repository to which you have administrator access
  3. A Mattermost account where incoming webhooks are enabled

Many web server options will work, below we provide instructions for Heroku and a general Linux/Ubuntu server.

Linux/Ubuntu Web Server Install

The following procedure shows how to install this project on a Linux web server running Ubuntu 14.04. The following instructions work behind a firewall so long as the web server has access to your GitLab and Mattermost instances.

To install this project using a Linux-based web server, you will need a Linux/Ubuntu 14.04 web server supporting Python >= 2.7. Other compatible operating systems and Python versions should also work.

Here's how to start:

  1. Set up your Mattermost instance to receive incoming webhooks

  2. Log in to your Mattermost account. Click the three dot menu at the top of the left-hand side and go to Integrations > Incoming Webhooks.

  3. Click Add incoming webhook.

  4. Specify the name of the webhook and select the channel in which you want GitLab notifications to appear.

  5. Copy the contents next to URL of the new webhook you just created (we'll refer to this as https://<your-mattermost-webhook-URL>).

  6. Set up this project to run on your web server

  7. Set up a Linux Ubuntu 14.04 server either on your own machine or on a hosted service, like AWS.

  8. SSH into the machine, or just open your terminal if you're installing locally.

  9. Confirm Python >= 2.7 or a compatible version is installed by running:

    • python --version If it's not installed you can find it here
  10. Install pip and other essentials:

    • sudo apt-get install python-pip python-dev build-essential
  11. Create a virtualenv if you want to keep things separated:

    • [sudo] pip install virtualenv
    • to handle virtual envs even simpler consider the virtualenvwrapper: [sudo] pip install virtualenvwrapper
  12. Install integration requirements:

    • [sudo] pip install git+https://github.com/NotSqrt/mattermost-integration-gitlab
  13. Run the server:

    • mattermost_gitlab --help
    • mattermost_gitlab $MATTERMOST_WEBHOOK_URL You will see the output similar to Running on http://0.0.0.0:5000/ (Press CTRL+C to quit). This is default IP:PORT pair the integration service will listen on. We will refer to this address as the http://<your-mattermost-integration-URL>). You may change the IP:PORT with the adequate command-line options (see --help)
  14. You may want to add a script to auto-start mattermost_gitlab at boot:

Using upstart script

# /etc/init/mattermost-gitlab.conf
start on runlevel [2345]
stop on runlevel [016]
respawn

# Change this to the relevant user
setuid mattermost

# Change the path if necessary, add options if need be
exec /home/mattermost/ve/bin/mattermost_gitlab http://mattermost/hooks/hook-id

Using Supervisor

Instead of an upstart script you may want to handle the mattermost_gitlab with supervisor. The sample config file can be as simple as:

[program:mattermost-gitlab]
user=mattermost
command=/home/mattermost/ve/mattermost/bin/mattermost_gitlab http://mattermost/hooks/hook-id
autostart=true
autorestart=true
stdout_logfile=/home/mattermost/logs/mattermost_gitlab.log
redirect_stderr=true

Using systemctl

Another script using systemctl:

  • sudo touch /etc/systemd/system/mattermost_gitlab.service
  • sudo nano /etc/systemd/system/mattermost_gitlab.service
  • Copy the following lines into /etc/systemd/system/mattermost_gitlab.service
[Unit]
Description=Mattermost gitlab integration
After=syslog.target network.target

[Service]
Type=simple
User=mattermost
Group=mattermost
ExecStart=/usr/local/bin/mattermost_gitlab http://mattermost/hooks/hook-id
PrivateTmp=yes
WorkingDirectory=/opt/mattermost #for omnibus installations, use /opt/gitlab/embedded/service/mattermost
Restart=always
RestartSec=30
LimitNOFILE=49152

[Install]
WantedBy=multi-user.target
  • systemctl daemon-reload
  • systemctl enable mattermost_gitlab
  • systemctl start mattermost_gitlab

Using Docker

Simply build docker image and run it. There are several environment variables that can be used to change behaviour of plugin (see entrypoint.sh)

docker build -t mattermost-integration-gitlab .
docker run -d -E MATTERMOST_WEBHOOK_URL=http://mattermost/hooks/hook-id mattermost-integration-gitlab
  1. Connect your project to your GitLab account for outgoing webhooks

  2. Log in to your GitLab account and open the project from which you want to receive updates and to which you have administrator access. From the settings menu of the project, click on Webhooks. In the URL field enter http://<your-mattermost-integration-URL>/new_event (notice extra new_event URL argument). On this address the integration service will be receiving the events from your GitLab project. Make sure your URL has a leading http:// or https://.

  3. On the same page, under Trigger select the events you want to receive, Push events, Comment events, Issue events, Merge Request events for instance.

  4. (Recommended but optional): Encrypt your connection from GitLab to your project by selecting Enable SSL verification. If this option is not available and you're not familiar with how to set it up, contact your GitLab System Administrator for help.

  5. Click Add Webhook and check that your new webhook entry is added to the Webhooks section below the button.

  6. Leave this page open as we'll come back to it to test that everything is working.

  7. Test your webhook integration

  8. If your GitLab project is in active development, return to the Settings > Web Hooks page of your GitLab project and click Test Hook to send a test message about one of your recent updates from your GitLab project to Mattermost. You should see a notification on the Gitlab page that the hook was successfully executed. In Mattermost, go to the channel which you specified when creating the URL for your incoming webhook and make sure that the message delivered successfully.

  9. If your GitLab project is new, try creating a test issue and then verify that the issue is posted to Mattermost.

  10. Remove the export PUSH_TRIGGER=True line from your ~/.bash_profile and source it again source ~/.bash_profile. This was used for testing only, and is better left turned off for production

  11. If you have any issues, please go to https://github.com/NotSqrt/mattermost-integration-gitlab and let us know which steps in these instructions were unclear or didn't work.

Heroku-based Install

❗ This was not adapted to the new python package.

To install this project using Heroku, you will need:

  1. A Heroku account, available for free at Heroku.com
  2. A GitHub account, available for free at GitHub.com

Here's how to start:

  1. Create a copy of this project to manipulate

  2. Log in to your GitHub account. Go to the Github repository of this project and click Fork in the top-right corner to create a copy of this project that you control and manipulate.

  3. Deploy your project copy to Heroku

  4. Go to your Heroku Dashboard and click + in the top-right corner then Create New App. Give your app a unqiue name (like mattermost-gitlab-[YOUR_GITHUB_USERNAME]), select your region and click Create App.

  5. Heroku directs you to the Deploy tab of the dashboard for your new app, select GitHub as your connection option, then click Connect to GitHub at the bottom of the screen to authorize Herkou to access your GitHub account.

  6. In the pop up window, click Authorize Application to allow Heroku to access your accounts repositories. On your Heroku dashboard, select your account in the first drop-down then search for the repo we created earlier by forking this project. Type mattermost-integration-gitlab in the repo-name field, then click Search and then the Connect button once Heroku finds your repository.

  7. Scroll to the bottom of the new page. Under the Manual Deploy section, make sure the master branch is selected then click Deploy Branch. After a few seconds you'll see a confirmation that the app has been deployed.

  8. At the top of your app dashboard, go to the Settings tab and scroll down to the Domains section. Copy the URL below Heroku Domain (we'll refer to this as http://<your-heroku-domain>/ and we'll need it in the next step)

  9. Leave your Heroku interface open as we'll come back to it to finish the setup.

  10. Connect your project to your GitLab account for outgoing webhooks

  11. Log in to GitLab account and open the project from which you want to receive updates and to which you have administrator access. From the left side of the project screen, click on Settings > Web Hooks. In the URL field enter http://<your-heroku-domain>/ from the previous step, plus the word new_event to create an entry that reads http://<your-heroku-domain>/new_event so events from your GitLab project are sent to your Heroku server. Make sure your URL has a leading http:// or https://.

  12. On the same page, under Trigger select Push events, Comment events, Issue events, Merge Request events

  13. (Recommended but optional): Encrypt your connection from GitLab to your project by selecting Enable SSL verification. If this option is not available and you're not familiar with how to set it up, contact your GitLab System Administrator for help.

  14. Click Add Web Hook and check that your new webhook entry is added to the Web hooks section below the button.

  15. Leave this page open as we'll come back to it to test that everything is working.

  16. Set up your Mattermost instance to receive incoming webhooks

  17. Log in to your Mattermost account. Click the three dot menu at the top of the left-hand side and go to Integrations > Incoming Webhooks.

  18. Click Add incoming webhook.

  19. Specify the name of the webhook and select the channel in which you want GitLab notifications to appear.

  20. Copy the contents next to URL of the new webhook you just created (we'll refer to this as https://<your-mattermost-webhook-URL> and add it to your Heroku server).

  21. Go back to your Heroku app dashboard under the Settings tab. Under the Config Variables section, click Reveal Config Vars

    1. Type MATTERMOST_WEBHOOK_URL in the KEY field and paste https://<your-mattermost-webhook-URL> into the VALUE field, then click Add.
    2. In the second KEY field, type PUSH_TRIGGER and in the corresponding VALUE field, type True.
  22. Test your webhook integration

  23. If your GitLab project is in active development, return to the Settings > Web Hooks page of your GitLab project and click Test Hook to send a test message about one of your recent updates from your GitLab project to Mattermost. You should see a notification on the Gitlab page that the hook was successfully executed. In Mattermost, go to the channel which you specified when creating the URL for your incoming webhook and make sure that the message delivered successfully.

  24. If your GitLab project is new, try creating a test issue and then verify that the issue is posted to Mattermost.

  25. Back on the settings tab of your Heroku app dashboard, under the Config Variables, click Reveal Config Vars and then click the X next to the PUSH_TRIGGER field you added. This config variable was used for testing only, and is better left turned off for production

  26. If you have any issues, please go to http://forum.mattermost.org and let us know which steps in these instructions were unclear or didn't work.

mattermost-integration-gitlab's People

Contributors

chengweiv5 avatar cifvts avatar crackcomm avatar djabx avatar it33 avatar jhooyberghs avatar jwilander avatar martindelille avatar notsqrt avatar pbabics avatar qvazzler avatar sebzur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mattermost-integration-gitlab's Issues

docker build command in Readme.md

I am not sure if it is related to my Docker environment, but for this command:
docker build -t mattermost-integration-gitlab .
I need to update to "docker build -<Dockerfile -t mattermost-integration-gitlab ." to get it running.Otherwise, it would report missing parameter.

Support other Flask config backends

Flask is scalable, thus it can be easily adopted to use uWSGI. However, the config is hardcoded and cannot be loaded from another place.

Way should be added to load config from an environment variable.

support multiple channel?

I have setup mattermost-integration-gitlab by following the README on a ubuntu server, actually, in a docker container.

However, it seems that this project only support one channel, is there any plan to support multiple channel? So that mattermost-gitlab can be an infra service, like mattermost.

Event reaches mattermost_gitlab but not mattermost

Hi,

I would like some help, I have set it up according to the installation and when I press "Test" in the gitlab webhooks page, I see

127.0.0.1 - - [04/Feb/2017 12:16:59] "POST /new_event HTTP/1.1" 200 -

in mattermost_gitlab console, so that looks good, but nothing is being posted in the mattermost channel I chosed.

I double-checked the webhook-URL and used copy&paste, so a typo there should not be possible.

Is there any way to put the tool into debug / verbose mode to see where / why there is an error?

thanks

SSL problem - Certificate verify failed

Hi,
I've posted my problem on the Mattermost forum but got no reponses. Hopefully you can give us some pointers on how to fix our issue.

Based on the instructions here I created my own docker container.

FROM python:2.7.11

MAINTAINER "David "

RUN pip install git+https://github.com/NotSqrt/mattermost-integration-gitlab

EXPOSE 5000

ENTRYPOINT mattermost_gitlab $MATTERMOST_WEBHOOK_URL

When I connect GitLab with this container and click on Test webhook it seems to work OK,

I see the following on the log:

10.0.0.19 - - [30/May/2016 15:48:02] "POST /new_event HTTP/1.1" 200 -

However, when I add an actual comment it fails and I see the following:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/mattermost_gitlab/server.py", line 46, in new_event
    post_text(text)
  File "/usr/local/lib/python2.7/site-packages/mattermost_gitlab/server.py", line 92, in post_text
    resp = requests.post(app.config['MATTERMOST_WEBHOOK_URL'], headers=headers, data=json.dumps(data))
  File "/usr/local/lib/python2.7/site-packages/requests/api.py", line 109, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/requests/api.py", line 50, in request
    response = session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 468, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 576, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/requests/adapters.py", line 433, in send
    raise SSLError(e, request=request)
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
10.0.0.19 - - [30/May/2016 15:53:35] "POST /new_event HTTP/1.1" 200 -

Mattermost is behind a reverse proxy and we use a SSL certificate, but it's not self-signed.

Any ideas on what I am doing wrong?

Many thanks.

Revising suggestions for systemctl unit creation mentioned in README

Original text

Using systemctl

Another script using systemctl:

  • sudo touch /etc/systemd/system/mattermost_gitlab.service
  • 'sudo vi /etc/systemd/system/mattermost_gitlab.service`
  • Copy the following lines into /etc/systemd/system/mattermost_gitlab.service
[Unit]
Description=Mattermost gitlab integration
After=syslog.target network.target

[Service]
Type=simple
User=mattermost
Group=mattermost
ExecStart=/usr/local/bin/mattermost_gitlab http://mattermost/hooks/hook-id
PrivateTmp=yes
WorkingDirectory=/opt/mattermost
Restart=always
RestartSec=30
LimitNOFILE=49152

[Install]
WantedBy=multi-user.target
  • systemctl daemon-reload
  • systemctl enable mattermost
  • systemctl start mattermost

Suggested text

Using systemctl

Another script using systemctl:

  • sudo chown mattermost:mattermost /usr/local/bin/mattermost_gitlab
  • sudo nano /etc/systemd/system/mattermost_gitlab.service
  • Copy the following lines into /etc/systemd/system/mattermost_gitlab.service
[Unit]
Description=Mattermost gitlab integration
After=syslog.target network.target

[Service]
Type=simple
User=mattermost
Group=mattermost
ExecStart=/usr/local/bin/mattermost_gitlab http://mattermost/hooks/hook-id
PrivateTmp=yes
WorkingDirectory=/opt/mattermost #for omnibus installations, use /opt/gitlab/embedded/service/mattermost
Restart=always
RestartSec=30
LimitNOFILE=49152

[Install]
WantedBy=multi-user.target
  • systemctl daemon-reload
  • systemctl enable mattermost_gitlab
  • systemctl start mattermost_gitlab

Corrections made

  • Not sure if this is a good idea, but I added instruction to do chown command and assign ownership of gitlab_mattermost to user mattermost and group mattermost. Assuming this is the best approach, correct me if chmod is the better option or if this should be skipped entirely.
  • systemctl commands at bottom did not reference the correct unit name
  • nano is better suited for all audiences, hands down.
  • working directory needs to be different for omnibus installations, otherwise you'll get a very cryptic error message from /opt/var/syslog. (Reference can be found here)
Dec 12 10:31:35 gitlab systemd[5406]: mattermost_gitlab.service: Failed at step CHDIR spawning /usr/local/bin/mattermost_gitlab: No such file or directory

Mattermost moving to API version 4

Hey @NotSqrt !

First, hugely appreciate you sharing this project back with the world. Fantastic work!

I wanted to let you know about our plans moving to API v4:

To make the Mattermost API web service easier to use and to offer more powerful options for these integrations, Mattermost will be moving to a new API version soon. Highlights include:

  • Fully documented API endpoints
  • More in-depth access to server functionality
  • Wider use of established HTTP verbs
  • Consistent endpoint structures
  • A new and improved Go driver

We plan to release API version 4 on March 16th, with Mattermost server 3.7. While the current API version 3 will be supported until September 16th, we recommend you begin using API version 4 soon after its release.

Contributing

API version 4 is an active and on-going project. If you're interested in helping contribute, please join our Mattermost community instance and the APIv4 channel.

We've prepared a contribution process for APIv4 and a progress tracker for new APIv4 enpoints to help you get started.

We're also open for suggestions on adding new API endpoints to help with your integration.

Send push events

I would really like to send push events to a Mattermost channel, this seems not to be possible. Is there a particular reason for this?

Thanks!

Error 405

related to issue #31...
I have the same issue event if I write "/new_event"

Capture d’écran 2020-05-20 à 18 31 59

ENH: Linkify links to issues and PRs

Links to issues and PRs are not links in mattermost.
For example, these are not linked:

- A link to #3
- A link to repo#3
- A link to orgname/repo#3

One way I can think of to fix this would be to convert the links to markdown before POSTing them to mattermost. IDK where that function is?

No access control?

I've gotten everything working, BUT it means I'm now running a daemon on port 5000 (or any other port number) that anybody can connect to (and create messages in my Mattermost channel). I could use firewall rules to limit connections, but then I would need to know all IPs Gitlab could use. Another alternative would be to add some magic cookie or similar to at least minimize unauthorized connections to the port. Is any of this supported already, and if so, how would I do it?

KeyError: u'action'

Hey all

Have a problem to receive events, even merge events, which are enabled by default.

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/mattermost_gitlab/server.py", line 45, in new_event
text = event.format()
File "/usr/local/lib/python2.7/dist-packages/mattermost_gitlab/event_formatter.py", line 204, in format
if self.action == 'open':
File "/usr/local/lib/python2.7/dist-packages/mattermost_gitlab/event_formatter.py", line 200, in action
return self.data['object_attributes']['action']
KeyError: u'action'
x.y.z.a - - [18/Jun/2020 16:21:46] "POST /new_event HTTP/1.1" 200 -

All is Setup based on README.

Mattermost incoming webhook:

image

Gitlab project webhook:

image

Anything i missed to configure?

Thanks for help

Regards
thomi

Media on Wiki notifications doesn't get displayed

Having added this integration to our company GitLab/Mattermost instance yesterday, I found this to be a very pleasant experience. Kudos to that!

Unfortunately, one thing that doesn't seem to work is displaying Wiki change notifications.

While text is properly displayed, local media files (images, for the most part) are not.

The element links to

<URLofMattermostInstance>/uploads/<commitID>/<nameOfFile>.<fileExtension>" `

(i. e. https://localhost:4443/uploads/0cad766c6370cb1221d62883c21c04ed/image.png).

A path that doesn't exist.

Is there anything I can do to alleviate this?

One-line/X character limit display option for Issues and comments notifications in a Mattermost channel

We're using this integration, and thanks so much for it! A request: we'd like to limit the length of a notification in a Mattermost channel of a new GitLab Issue or Comment on an existing issue to one line and/or X characters. We have a Channel for a GitLab project, and a webhook to feed notifications to that channel, but folks want to minimize the length of the text that appears - so if someone writes a lengthy Issue description or comment, it won't all appear, but instead only the first line/X characters, with a link to the entire Issue/comment on the GitLab project page. Any help appreciated. Thanks!

Error 405

Hi guys

I'm having an error in my integration
When i run the command (mattermost_gitlab -p 10000 --host 10.160.47.84 --no-verify-ssl http://mattermost/hooks/hook_id)

When i test the hook or make some integration with gitlab i got this response:
10.160.44.226 - - [03/Apr/2017 15:57:01] "POST / HTTP/1.1" 405 -

If someone can help me it will be great!

Unable to retrieve address for web hooks

Is the installation guide up-to-date, please? I am unable to retrieve address for web hooks.

Set up your Mattermost instance to receive incoming webhooks

Log in to your Mattermost account. Click the three dot menu at the top of the left-hand side and go to Account Settings > Integrations > Incoming Webhooks.
Under Add a new incoming webhook select the channel in which you want GitLab notifications to appear, then click Add to create a new entry.
Copy the contents next to URL of the new webhook you just created (we'll refer to this as https://<your-mattermost-webhook-URL>).

Thanks in advance for any help.

500 Errors when testing a webhook

Hello,

I've an already up and running gitlab 8.9.3, and wanted to add a mattermost instance on another server, which I did.

I wanted to add the mattermost-gitlab-integration to mattermost ( https://github.com/NotSqrt/mattermost-integration-gitlab ). The thing is… I get an error 500 everytime I try to contact mattermost via the incomming webhooks (when clicking on "test")

Here is the production.log I get :

Started GET "/plus/plus/hooks/32/test" for 185.116.128.22 at 2016-06-30 13:22:51 +0200
Processing by Projects::HooksController#test as HTML
  Parameters: {"namespace_id"=>"plus", "project_id"=>"plus", "id"=>"32"}
Completed 500 Internal Server Error in 745ms (ActiveRecord: 25.0ms)

HTTParty::RedirectionTooDeep (HTTP redirects too deep):
  app/models/hooks/web_hook.rb:24:in `execute'
  app/services/test_hook_service.rb:4:in `execute'
  app/controllers/projects/hooks_controller.rb:28:in `test'
  lib/gitlab/middleware/go.rb:16:in `call'

Do you have any idea where I could dig more ?

Thanks

Working with mattermost 3.1 and gitlab 8.9 ?

I was testing this with our current gitlab omnibus installed version, gitlab 8.9 and mattermost 3.1, running the flask service on the same server as the both gitlab and mattermost.

After configuring the hook in a gitlab project, when trying to test the hook I saw the following output in the console:

 * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
127.0.0.1 - - [06/Jul/2016 22:35:10] "POST /new_event HTTP/1.1" 200 -

but no message ever arrived in the mattermost channel.

I tried modifying main() for debug info with:

 app.run(host=host, port=port, debug=True)

but it didn't provide very useful information.

Does this integration still work with the mentioned versions? If so, where else would I look to debug?

No webhook is triggered to mattermost

I try to make this integration working without success. I configured gitlab and ran the following command:

mattermost_gitlab http://requestb.in/1bmu9np1

and when a push a commit to the server, I have the following line

153.xxx.xxx.xxx - - [23/Nov/2016 17:31:43] "POST /new_event HTTP/1.1" 200 -

Unfortunatly no webhook is sent to http://requestb.in/1bmu9np1 although no error is displayed.

I will try to investigate it myself but any help is appreciated.

Integration throws KeyError on test.

Having followed the guidelines for the installation I got to the point of testing. On testing the service ( from gitlab) I can see the integration server complaining:

(gitalb version 8.16.5)

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/mattermost_gitlab/server.py", line 42, in new_event
    event = event_formatter.as_event(request.json)
  File "/usr/local/lib/python2.7/dist-packages/mattermost_gitlab/event_formatter.py", line 281, in as_event
    if data['object_kind'] in EVENT_CLASS_MAP:
KeyError: u'object_kind'
127.0.0.1 - - [17/Feb/2017 10:10:10] "POST /new_event HTTP/1.1" 200 -

This is the test data gitlab is sending:

{"event_name":"project_create","name":"Ruby","path":"ruby","project_id":1,"owner_name":"Someone","owner_email":"[email protected]"}

No message is posted to mattermost. However, actual push events generated on gitlab side do appear in mattermost.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.