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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
b1f5af40
Commit
b1f5af40
authored
Nov 18, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bring back the `commit_url` as it's used by CycleAnalytics
parent
43898f8e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
app/serializers/commit_entity.rb
app/serializers/commit_entity.rb
+7
-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 @
b1f5af40
...
...
@@ -3,6 +3,13 @@ class CommitEntity < API::Entities::RepoCommit
expose
:author
,
using:
UserEntity
expose
:commit_url
do
|
commit
|
namespace_project_tree_url
(
request
.
project
.
namespace
,
request
.
project
,
id:
commit
.
id
)
end
expose
:commit_path
do
|
commit
|
namespace_project_tree_path
(
request
.
project
.
namespace
,
...
...
spec/serializers/commit_entity_spec.rb
View file @
b1f5af40
...
...
@@ -35,6 +35,10 @@ describe CommitEntity do
expect
(
subject
).
to
include
(
:commit_path
)
end
it
'contains URL to commit'
do
expect
(
subject
).
to
include
(
:commit_url
)
end
it
'needs to receive project in the request'
do
expect
(
request
).
to
receive
(
:project
)
.
and_return
(
project
)
...
...
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