Looks for correct key to pass to commit prop. Adds rspec test.
This commit is contained in:
parent
e0d93a5a1f
commit
38bcc1e0e7
3 changed files with 11 additions and 3 deletions
|
@ -111,7 +111,7 @@ require('./commit');
|
|||
* If provided, returns the commit ref.
|
||||
* Needed to render the commit component column.
|
||||
*
|
||||
* Matched `url` prop sent in the API to `path` prop needed
|
||||
* Matches `path` prop sent in the API to `ref_url` prop needed
|
||||
* in the commit component.
|
||||
*
|
||||
* @returns {Object|Undefined}
|
||||
|
@ -119,8 +119,8 @@ require('./commit');
|
|||
commitRef() {
|
||||
if (this.pipeline.ref) {
|
||||
return Object.keys(this.pipeline.ref).reduce((accumulator, prop) => {
|
||||
if (prop === 'url') {
|
||||
accumulator.path = this.pipeline.ref[prop];
|
||||
if (prop === 'path') {
|
||||
accumulator.ref_url = this.pipeline.ref[prop];
|
||||
} else {
|
||||
accumulator[prop] = this.pipeline.ref[prop];
|
||||
}
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: Fixes Pipelines table is not showing branch name for commit
|
||||
merge_request:
|
||||
author:
|
|
@ -35,6 +35,10 @@ describe 'Pipelines', :feature, :js do
|
|||
it 'contains pipeline commit short SHA' do
|
||||
expect(page).to have_content(pipeline.short_sha)
|
||||
end
|
||||
|
||||
it 'contains branch name' do
|
||||
expect(page).to have_content(pipeline.ref)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue