BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
commit_entity.rb
app/serializers/commit_entity.rb
+4
-0
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