Skip to content
Snippets Groups Projects
Commit 47b8516c authored by David Turner's avatar David Turner
Browse files

Add username field to push webhook

parent bbd83376
No related branches found
No related tags found
No related merge requests found
---
title: add username field to push webhook
merge_request:
author: David Turner
Loading
Loading
@@ -74,6 +74,7 @@ X-Gitlab-Event: Push Hook
"checkout_sha": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
"user_id": 4,
"user_name": "John Smith",
"user_username": "jsmith",
"user_email": "john@example.com",
"user_avatar": "https://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=8://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=80",
"project_id": 15,
Loading
Loading
Loading
Loading
@@ -11,6 +11,7 @@ module Gitlab
# ref: String,
# user_id: String,
# user_name: String,
# user_username: String,
# user_email: String
# project_id: String,
# repository: {
Loading
Loading
@@ -51,6 +52,7 @@ module Gitlab
message: message,
user_id: user.id,
user_name: user.name,
user_username: user.username,
user_email: user.email,
user_avatar: user.avatar_url,
project_id: project.id,
Loading
Loading
Loading
Loading
@@ -35,6 +35,7 @@ describe Gitlab::DataBuilder::Push, lib: true do
it { expect(data[:ref]).to eq('refs/tags/v1.1.0') }
it { expect(data[:user_id]).to eq(user.id) }
it { expect(data[:user_name]).to eq(user.name) }
it { expect(data[:user_username]).to eq(user.username) }
it { expect(data[:user_email]).to eq(user.email) }
it { expect(data[:user_avatar]).to eq(user.avatar_url) }
it { expect(data[:project_id]).to eq(project.id) }
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment