diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-11-18 22:31:26 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-11-18 22:31:26 +0100 |
commit | b1f5af40598528fbc1326946376a595d41793537 (patch) | |
tree | fc85fbac4690272de2e6bf5520ba0067dad6a22a /app/serializers | |
parent | 43898f8efbe4981ad2ca67e7804db2c73fe2f3e2 (diff) | |
download | gitlab-ce-b1f5af40598528fbc1326946376a595d41793537.tar.gz |
Bring back the `commit_url` as it's used by CycleAnalytics
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/commit_entity.rb | 7 |
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, |