2016-11-03 07:54:10 -04:00
|
|
|
class CommitEntity < API::Entities::RepoCommit
|
|
|
|
include RequestAwareEntity
|
|
|
|
|
2016-11-04 08:08:58 -04:00
|
|
|
expose :author, using: UserEntity
|
2016-11-04 05:16:30 -04:00
|
|
|
|
2016-11-18 16:31:26 -05:00
|
|
|
expose :commit_url do |commit|
|
|
|
|
namespace_project_tree_url(
|
|
|
|
request.project.namespace,
|
|
|
|
request.project,
|
|
|
|
id: commit.id)
|
|
|
|
end
|
|
|
|
|
2016-11-17 10:08:05 -05:00
|
|
|
expose :commit_path do |commit|
|
|
|
|
namespace_project_tree_path(
|
2016-11-04 10:00:39 -04:00
|
|
|
request.project.namespace,
|
|
|
|
request.project,
|
2016-11-03 07:54:10 -04:00
|
|
|
id: commit.id)
|
|
|
|
end
|
|
|
|
end
|