Address webhook payload user attributes inconsistencies
Summary
The 'Push' and 'Tag Push' webhook events return user data in the form of user_name
and user_email
whereas all the other webhook events are returning user.name
and user.email`.
I'm not sure if this is done intentionally or this is a bug, there is no mention of the difference anywhere that I can find in the documentation.
Steps to reproduce
This is present in the documentation: https://docs.gitlab.com/ce/web_hooks/web_hooks.html
Expected behavior
{
"user": {
"id": 4,
"name": "John Smith",
"email": "john@example.com",
"avatar": "https://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=8://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=80"
}
}
Actual behavior
{
"user_id": 4,
"user_name": "John Smith",
"user_email": "john@example.com",
"user_avatar": "https://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=8://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=80"
}
Edited by Mark Fletcher