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
d6825da3
Commit
d6825da3
authored
Dec 14, 2020
by
serenafang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add expires_at to group member builder data
parent
d89f1742
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
lib/gitlab/hook_data/group_member_builder.rb
lib/gitlab/hook_data/group_member_builder.rb
+3
-1
spec/lib/gitlab/hook_data/group_member_builder_spec.rb
spec/lib/gitlab/hook_data/group_member_builder_spec.rb
+2
-1
No files found.
lib/gitlab/hook_data/group_member_builder.rb
View file @
d6825da3
...
...
@@ -19,6 +19,7 @@ module Gitlab
# :group_access=>"Guest",
# :created_at=>"2020-11-04T10:12:10Z",
# :updated_at=>"2020-11-04T10:12:10Z",
# :expires_at=>"2020-12-04T10:12:10Z"
# }
def
build
(
event
)
...
...
@@ -40,7 +41,8 @@ module Gitlab
user_name:
group_member
.
user
.
name
,
user_email:
group_member
.
user
.
email
,
user_id:
group_member
.
user
.
id
,
group_access:
group_member
.
human_access
group_access:
group_member
.
human_access
,
expires_at:
group_member
.
expires_at
&
.
xmlschema
}
end
...
...
spec/lib/gitlab/hook_data/group_member_builder_spec.rb
View file @
d6825da3
...
...
@@ -11,7 +11,7 @@ RSpec.describe Gitlab::HookData::GroupMemberBuilder do
let
(
:event_name
)
{
data
[
:event_name
]
}
let
(
:attributes
)
do
[
:event_name
,
:created_at
,
:updated_at
,
:group_name
,
:group_path
,
:event_name
,
:created_at
,
:updated_at
,
:
expires_at
,
:
group_name
,
:group_path
,
:group_id
,
:user_id
,
:user_username
,
:user_name
,
:user_email
,
:group_access
]
end
...
...
@@ -31,6 +31,7 @@ RSpec.describe Gitlab::HookData::GroupMemberBuilder do
expect
(
data
[
:group_access
]).
to
eq
(
'Developer'
)
expect
(
data
[
:created_at
]).
to
eq
(
group_member
.
created_at
&
.
xmlschema
)
expect
(
data
[
:updated_at
]).
to
eq
(
group_member
.
updated_at
&
.
xmlschema
)
expect
(
data
[
:expires_at
]).
to
eq
(
group_member
.
expires_at
&
.
xmlschema
)
end
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