summaryrefslogtreecommitdiff
path: root/app/serializers/commit_entity.rb
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-11-18 22:31:26 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2016-11-18 22:31:26 +0100
commitb1f5af40598528fbc1326946376a595d41793537 (patch)
treefc85fbac4690272de2e6bf5520ba0067dad6a22a /app/serializers/commit_entity.rb
parent43898f8efbe4981ad2ca67e7804db2c73fe2f3e2 (diff)
downloadgitlab-ce-b1f5af40598528fbc1326946376a595d41793537.tar.gz
Bring back the `commit_url` as it's used by CycleAnalytics
Diffstat (limited to 'app/serializers/commit_entity.rb')
-rw-r--r--app/serializers/commit_entity.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/serializers/commit_entity.rb b/app/serializers/commit_entity.rb
index bc92a1c8545..acc20f6dc52 100644
--- a/app/serializers/commit_entity.rb
+++ b/app/serializers/commit_entity.rb
@@ -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,