BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
6f4f99f4
Commit
6f4f99f4
authored
Jan 13, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Plain Diff
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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
commit_entity.rb
app/serializers/commit_entity.rb
+4
-4
fix-serialized-commit-path.yml
changelogs/unreleased/fix-serialized-commit-path.yml
+4
-0
commit_entity_spec.rb
spec/serializers/commit_entity_spec.rb
+2
-0
No files found.
app/serializers/commit_entity.rb
View file @
6f4f99f4
...
...
@@ -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
changelogs/unreleased/fix-serialized-commit-path.yml
0 → 100644
View file @
6f4f99f4
---
title
:
Fix links to commits pages on pipelines list page
merge_request
:
8558
author
:
spec/serializers/commit_entity_spec.rb
View file @
6f4f99f4
...
...
@@ -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
...
...
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