Commit 6f4f99f4 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'fix/serialized-commit-path' into 'master'

Update commit entity to point to valid commit page

Closes #26624

See merge request !8558
parents a3fcc681 c47e1f97
......@@ -8,16 +8,16 @@ class CommitEntity < API::Entities::RepoCommit
end
expose :commit_url do |commit|
namespace_project_tree_url(
namespace_project_commit_url(
request.project.namespace,
request.project,
id: commit.id)
commit)
end
expose :commit_path do |commit|
namespace_project_tree_path(
namespace_project_commit_path(
request.project.namespace,
request.project,
id: commit.id)
commit)
end
end
---
title: Fix links to commits pages on pipelines list page
merge_request: 8558
author:
......@@ -33,10 +33,12 @@ describe CommitEntity do
it 'contains path to commit' do
expect(subject).to include(:commit_path)
expect(subject[:commit_path]).to include "commit/#{commit.id}"
end
it 'contains URL to commit' do
expect(subject).to include(:commit_url)
expect(subject[:commit_path]).to include "commit/#{commit.id}"
end
it 'needs to receive project in the request' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment