Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
47b8516c
Commit
47b8516c
authored
May 10, 2017
by
David Turner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add username field to push webhook
Signed-off-by:
David Turner
<
novalis@novalis.org
>
parent
bbd83376
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
0 deletions
+8
-0
changelogs/unreleased/dturner-username.yml
changelogs/unreleased/dturner-username.yml
+4
-0
doc/user/project/integrations/webhooks.md
doc/user/project/integrations/webhooks.md
+1
-0
lib/gitlab/data_builder/push.rb
lib/gitlab/data_builder/push.rb
+2
-0
spec/lib/gitlab/data_builder/push_spec.rb
spec/lib/gitlab/data_builder/push_spec.rb
+1
-0
No files found.
changelogs/unreleased/dturner-username.yml
0 → 100644
View file @
47b8516c
---
title
:
add username field to push webhook
merge_request
:
author
:
David Turner
doc/user/project/integrations/webhooks.md
View file @
47b8516c
...
@@ -74,6 +74,7 @@ X-Gitlab-Event: Push Hook
...
@@ -74,6 +74,7 @@ X-Gitlab-Event: Push Hook
"checkout_sha"
:
"da1560886d4f094c3e6c9ef40349f7d38b5d27d7"
,
"checkout_sha"
:
"da1560886d4f094c3e6c9ef40349f7d38b5d27d7"
,
"user_id"
:
4
,
"user_id"
:
4
,
"user_name"
:
"John Smith"
,
"user_name"
:
"John Smith"
,
"user_username"
:
"jsmith"
,
"user_email"
:
"john@example.com"
,
"user_email"
:
"john@example.com"
,
"user_avatar"
:
"https://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=8://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=80"
,
"user_avatar"
:
"https://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=8://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=80"
,
"project_id"
:
15
,
"project_id"
:
15
,
...
...
lib/gitlab/data_builder/push.rb
View file @
47b8516c
...
@@ -11,6 +11,7 @@ module Gitlab
...
@@ -11,6 +11,7 @@ module Gitlab
# ref: String,
# ref: String,
# user_id: String,
# user_id: String,
# user_name: String,
# user_name: String,
# user_username: String,
# user_email: String
# user_email: String
# project_id: String,
# project_id: String,
# repository: {
# repository: {
...
@@ -51,6 +52,7 @@ module Gitlab
...
@@ -51,6 +52,7 @@ module Gitlab
message:
message
,
message:
message
,
user_id:
user
.
id
,
user_id:
user
.
id
,
user_name:
user
.
name
,
user_name:
user
.
name
,
user_username:
user
.
username
,
user_email:
user
.
email
,
user_email:
user
.
email
,
user_avatar:
user
.
avatar_url
,
user_avatar:
user
.
avatar_url
,
project_id:
project
.
id
,
project_id:
project
.
id
,
...
...
spec/lib/gitlab/data_builder/push_spec.rb
View file @
47b8516c
...
@@ -35,6 +35,7 @@ describe Gitlab::DataBuilder::Push, lib: true do
...
@@ -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
[
:ref
]).
to
eq
(
'refs/tags/v1.1.0'
)
}
it
{
expect
(
data
[
:user_id
]).
to
eq
(
user
.
id
)
}
it
{
expect
(
data
[
:user_id
]).
to
eq
(
user
.
id
)
}
it
{
expect
(
data
[
:user_name
]).
to
eq
(
user
.
name
)
}
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_email
]).
to
eq
(
user
.
email
)
}
it
{
expect
(
data
[
:user_avatar
]).
to
eq
(
user
.
avatar_url
)
}
it
{
expect
(
data
[
:user_avatar
]).
to
eq
(
user
.
avatar_url
)
}
it
{
expect
(
data
[
:project_id
]).
to
eq
(
project
.
id
)
}
it
{
expect
(
data
[
:project_id
]).
to
eq
(
project
.
id
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment