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
12a3b63a
Commit
12a3b63a
authored
Jan 20, 2021
by
Manoj M J
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove group owner data from webhooks
Remove group owner data from webhooks
parent
77f7a265
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
27 deletions
+9
-27
changelogs/unreleased/remove-owner-data-from-group-webhooks.yml
...logs/unreleased/remove-owner-data-from-group-webhooks.yml
+5
-0
doc/system_hooks/system_hooks.md
doc/system_hooks/system_hooks.md
+0
-12
lib/gitlab/hook_data/group_builder.rb
lib/gitlab/hook_data/group_builder.rb
+1
-7
spec/lib/gitlab/hook_data/group_builder_spec.rb
spec/lib/gitlab/hook_data/group_builder_spec.rb
+1
-4
spec/services/system_hooks_service_spec.rb
spec/services/system_hooks_service_spec.rb
+2
-4
No files found.
changelogs/unreleased/remove-owner-data-from-group-webhooks.yml
0 → 100644
View file @
12a3b63a
---
title
:
Remove group owner data from webhooks
merge_request
:
52071
author
:
type
:
changed
doc/system_hooks/system_hooks.md
View file @
12a3b63a
...
...
@@ -300,15 +300,11 @@ If the user is blocked via LDAP, `state` is `ldap_blocked`.
"updated_at"
:
"2012-07-21T07:38:22Z"
,
"event_name"
:
"group_create"
,
"name"
:
"StoreCloud"
,
"owner_email"
:
null
,
"owner_name"
:
null
,
"path"
:
"storecloud"
,
"group_id"
:
78
}
```
`owner_name`
and
`owner_email`
are always
`null`
. Please see
<https://gitlab.com/gitlab-org/gitlab/-/issues/20011>
.
**Group removed:**
```
json
...
...
@@ -317,15 +313,11 @@ If the user is blocked via LDAP, `state` is `ldap_blocked`.
"updated_at"
:
"2012-07-21T07:38:22Z"
,
"event_name"
:
"group_destroy"
,
"name"
:
"StoreCloud"
,
"owner_email"
:
null
,
"owner_name"
:
null
,
"path"
:
"storecloud"
,
"group_id"
:
78
}
```
`owner_name`
and
`owner_email`
are always
`null`
. Please see
[
issue #20011
](
https://gitlab.com/gitlab-org/gitlab/-/issues/20011
)
.
**Group renamed:**
```
json
...
...
@@ -337,15 +329,11 @@ If the user is blocked via LDAP, `state` is `ldap_blocked`.
"path"
:
"better-name"
,
"full_path"
:
"parent-group/better-name"
,
"group_id"
:
64
,
"owner_name"
:
null
,
"owner_email"
:
null
,
"old_path"
:
"old-name"
,
"old_full_path"
:
"parent-group/old-name"
}
```
`owner_name`
and
`owner_email`
are always
`null`
. Please see
<https://gitlab.com/gitlab-org/gitlab/-/issues/20011>
.
**New Group Member:**
```
json
...
...
lib/gitlab/hook_data/group_builder.rb
View file @
12a3b63a
...
...
@@ -14,8 +14,6 @@ module Gitlab
# :path=>"group1",
# :full_path=>"group1",
# :group_id=>1,
# :owner_name=>nil,
# :owner_email=>nil,
# :old_path=>"old-path",
# :old_full_path=>"old-path"
# }
...
...
@@ -32,15 +30,11 @@ module Gitlab
private
def
group_data
owner
=
group
.
owner
{
name:
group
.
name
,
path:
group
.
path
,
full_path:
group
.
full_path
,
group_id:
group
.
id
,
owner_name:
owner
.
try
(
:name
),
owner_email:
owner
.
try
(
:email
)
group_id:
group
.
id
}
end
...
...
spec/lib/gitlab/hook_data/group_builder_spec.rb
View file @
12a3b63a
...
...
@@ -10,8 +10,7 @@ RSpec.describe Gitlab::HookData::GroupBuilder do
let
(
:event_name
)
{
data
[
:event_name
]
}
let
(
:attributes
)
do
[
:event_name
,
:created_at
,
:updated_at
,
:name
,
:path
,
:full_path
,
:group_id
,
:owner_name
,
:owner_email
:event_name
,
:created_at
,
:updated_at
,
:name
,
:path
,
:full_path
,
:group_id
]
end
...
...
@@ -24,8 +23,6 @@ RSpec.describe Gitlab::HookData::GroupBuilder do
expect
(
data
[
:path
]).
to
eq
(
group
.
path
)
expect
(
data
[
:full_path
]).
to
eq
(
group
.
full_path
)
expect
(
data
[
:group_id
]).
to
eq
(
group
.
id
)
expect
(
data
[
:owner_name
]).
to
eq
(
nil
)
expect
(
data
[
:owner_email
]).
to
eq
(
nil
)
expect
(
data
[
:created_at
]).
to
eq
(
group
.
created_at
.
xmlschema
)
expect
(
data
[
:updated_at
]).
to
eq
(
group
.
updated_at
.
xmlschema
)
end
...
...
spec/services/system_hooks_service_spec.rb
View file @
12a3b63a
...
...
@@ -45,15 +45,13 @@ RSpec.describe SystemHooksService do
it
do
expect
(
event_data
(
group
,
:create
)).
to
include
(
:event_name
,
:name
,
:created_at
,
:updated_at
,
:path
,
:group_id
,
:owner_name
,
:owner_email
:event_name
,
:name
,
:created_at
,
:updated_at
,
:path
,
:group_id
)
end
it
do
expect
(
event_data
(
group
,
:destroy
)).
to
include
(
:event_name
,
:name
,
:created_at
,
:updated_at
,
:path
,
:group_id
,
:owner_name
,
:owner_email
:event_name
,
:name
,
:created_at
,
:updated_at
,
:path
,
:group_id
)
end
...
...
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