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
0541bffa
Commit
0541bffa
authored
Nov 12, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose commit author's gravatar if not gitlab user
parent
6186ac2c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
app/serializers/commit_entity.rb
app/serializers/commit_entity.rb
+4
-0
spec/serializers/commit_entity_spec.rb
spec/serializers/commit_entity_spec.rb
+4
-0
No files found.
app/serializers/commit_entity.rb
View file @
0541bffa
...
...
@@ -3,6 +3,10 @@ class CommitEntity < API::Entities::RepoCommit
expose
:author
,
using:
UserEntity
expose
:author_gravatar_url
do
|
commit
|
GravatarService
.
new
.
execute
(
commit
.
author_email
)
end
expose
:commit_url
do
|
commit
|
namespace_project_tree_url
(
request
.
project
.
namespace
,
...
...
spec/serializers/commit_entity_spec.rb
View file @
0541bffa
...
...
@@ -41,4 +41,8 @@ describe CommitEntity do
subject
end
it
'exposes gravatar url that belongs to author'
do
expect
(
subject
.
fetch
(
:author_gravatar_url
)).
to
match
/gravatar/
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