Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration throws KeyError on test. #30

Open
MonsieurCellophane opened this issue Feb 17, 2017 · 2 comments
Open

Integration throws KeyError on test. #30

MonsieurCellophane opened this issue Feb 17, 2017 · 2 comments

Comments

@MonsieurCellophane
Copy link

MonsieurCellophane commented Feb 17, 2017

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.

@MonsieurCellophane MonsieurCellophane changed the title Integration thorows KeyError on test. Integration throws KeyError on test. Feb 17, 2017
@MonsieurCellophane
Copy link
Author

MonsieurCellophane commented Feb 17, 2017

My mistake. The hook was created as a system hook rather then under project->edit "cog-icon"->integrations.

This could be clarified in the docs, though, as navigating the config of gitlab is not a linear experience, so to speak.

@NotSqrt
Copy link
Owner

NotSqrt commented Feb 17, 2017

Yeah, it's intended to be used on per-project hooks.
But still, it shouldn't fail so hard..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants