diff options
author | Clement Ho <clemmakesapps@gmail.com> | 2017-02-08 19:30:25 +0000 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2017-02-08 19:30:25 +0000 |
commit | ece75a89ffb29754c1e7fee8afe18c0a31551f6b (patch) | |
tree | 9a5ab0dfedc56832224d41583e3836d33c37bba9 | |
parent | 8820f3cdd2b04735f7c09b914ebaf186d2b9331d (diff) | |
parent | 38bcc1e0e725dc171837d27dc6852f07c803cc76 (diff) | |
download | gitlab-ce-ece75a89ffb29754c1e7fee8afe18c0a31551f6b.tar.gz |
Merge branch '27880-pipelines-table-not-showing-commit-branch' into 'master'
Looks for correct key to pass to commit prop. Adds rspec test.
Closes #27880
See merge request !9070
3 files changed, 11 insertions, 3 deletions
diff --git a/app/assets/javascripts/vue_shared/components/pipelines_table_row.js.es6 b/app/assets/javascripts/vue_shared/components/pipelines_table_row.js.es6 index c819f0dd7cd..61c1b72d9d2 100644 --- a/app/assets/javascripts/vue_shared/components/pipelines_table_row.js.es6 +++ b/app/assets/javascripts/vue_shared/components/pipelines_table_row.js.es6 @@ -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]; } diff --git a/changelogs/unreleased/27880-pipelines-table-not-showing-commit-branch.yml b/changelogs/unreleased/27880-pipelines-table-not-showing-commit-branch.yml new file mode 100644 index 00000000000..4251754618b --- /dev/null +++ b/changelogs/unreleased/27880-pipelines-table-not-showing-commit-branch.yml @@ -0,0 +1,4 @@ +--- +title: Fixes Pipelines table is not showing branch name for commit +merge_request: +author: diff --git a/spec/features/projects/pipelines/pipelines_spec.rb b/spec/features/projects/pipelines/pipelines_spec.rb index ca18ac073d8..6555b2fc6c1 100644 --- a/spec/features/projects/pipelines/pipelines_spec.rb +++ b/spec/features/projects/pipelines/pipelines_spec.rb @@ -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 |