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
89b38e1e
Commit
89b38e1e
authored
Jan 27, 2021
by
Vijay Hawoldar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add last_activity_on to BillableMember entity
parent
e18903f4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
3 deletions
+18
-3
doc/api/members.md
doc/api/members.md
+5
-2
ee/changelogs/unreleased/vij-add-last-activity.yml
ee/changelogs/unreleased/vij-add-last-activity.yml
+5
-0
ee/lib/ee/api/entities/billable_member.rb
ee/lib/ee/api/entities/billable_member.rb
+1
-0
ee/spec/lib/ee/api/entities/billable_member_spec.rb
ee/spec/lib/ee/api/entities/billable_member_spec.rb
+7
-1
No files found.
doc/api/members.md
View file @
89b38e1e
...
...
@@ -284,6 +284,7 @@ Example response:
"state"
:
"active"
,
"avatar_url"
:
"https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon"
,
"web_url"
:
"http://192.168.1.8:3000/root"
,
"last_activity_on"
:
"2021-01-27"
},
{
"id"
:
2
,
...
...
@@ -292,7 +293,8 @@ Example response:
"state"
:
"active"
,
"avatar_url"
:
"https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon"
,
"web_url"
:
"http://192.168.1.8:3000/root"
,
"email"
:
"john@example.com"
"email"
:
"john@example.com"
,
"last_activity_on"
:
"2021-01-25"
},
{
"id"
:
3
,
...
...
@@ -300,7 +302,8 @@ Example response:
"name"
:
"Foo bar"
,
"state"
:
"active"
,
"avatar_url"
:
"https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon"
,
"web_url"
:
"http://192.168.1.8:3000/root"
"web_url"
:
"http://192.168.1.8:3000/root"
,
"last_activity_on"
:
"2021-01-20"
}
]
```
...
...
ee/changelogs/unreleased/vij-add-last-activity.yml
0 → 100644
View file @
89b38e1e
---
title
:
Add last_activity_on attribute to Billable Members API
merge_request
:
52666
author
:
type
:
changed
ee/lib/ee/api/entities/billable_member.rb
View file @
89b38e1e
...
...
@@ -5,6 +5,7 @@ module EE
module
Entities
class
BillableMember
<
::
API
::
Entities
::
UserBasic
expose
:public_email
,
as: :email
expose
:last_activity_on
end
end
end
...
...
ee/spec/lib/ee/api/entities/billable_member_spec.rb
View file @
89b38e1e
...
...
@@ -3,10 +3,16 @@
require
'spec_helper'
RSpec
.
describe
::
EE
::
API
::
Entities
::
BillableMember
do
let
(
:member
)
{
build
(
:user
,
public_email:
public_email
,
email:
'private@email.com'
)
}
let
(
:last_activity_on
)
{
Date
.
today
}
let
(
:public_email
)
{
nil
}
let
(
:member
)
{
build
(
:user
,
public_email:
public_email
,
email:
'private@email.com'
,
last_activity_on:
last_activity_on
)
}
subject
(
:entity_representation
)
{
described_class
.
new
(
member
).
as_json
}
it
'returns the last_activity_on attribute'
do
expect
(
entity_representation
[
:last_activity_on
]).
to
eq
last_activity_on
end
context
'when the user has a public_email assigned'
do
let
(
:public_email
)
{
'public@email.com'
}
...
...
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