Commit 0bf45519 authored by Filipa Lacerda's avatar Filipa Lacerda

Fix conflicts for ...

Fix conflicts for  app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline.vue
parent 2ee16104
<script> <script>
<<<<<<< HEAD
/* eslint-disable vue/require-default-prop */
import PipelineStage from '~/pipelines/components/stage.vue';
import CiIcon from '~/vue_shared/components/ci_icon.vue';
import Icon from '~/vue_shared/components/icon.vue';
import LinkedPipelinesMiniList from 'ee/vue_shared/components/linked_pipelines_mini_list.vue';
export default {
name: 'MRWidgetPipeline',
components: {
PipelineStage,
CiIcon,
Icon,
LinkedPipelinesMiniList,
=======
/* eslint-disable vue/require-default-prop */ /* eslint-disable vue/require-default-prop */
import PipelineStage from '~/pipelines/components/stage.vue'; import PipelineStage from '~/pipelines/components/stage.vue';
import CiIcon from '~/vue_shared/components/ci_icon.vue'; import CiIcon from '~/vue_shared/components/ci_icon.vue';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
import LinkedPipelinesMiniList from 'ee/vue_shared/components/linked_pipelines_mini_list.vue';
export default { export default {
name: 'MRWidgetPipeline', name: 'MRWidgetPipeline',
...@@ -25,12 +11,12 @@ export default { ...@@ -25,12 +11,12 @@ export default {
PipelineStage, PipelineStage,
CiIcon, CiIcon,
Icon, Icon,
LinkedPipelinesMiniList,
}, },
props: { props: {
pipeline: { pipeline: {
type: Object, type: Object,
required: true, required: true,
>>>>>>> upstream/master
}, },
// This prop needs to be camelCase, html attributes are case insensive // This prop needs to be camelCase, html attributes are case insensive
// https://vuejs.org/v2/guide/components.html#camelCase-vs-kebab-case // https://vuejs.org/v2/guide/components.html#camelCase-vs-kebab-case
...@@ -38,45 +24,9 @@ export default { ...@@ -38,45 +24,9 @@ export default {
type: Boolean, type: Boolean,
required: false, required: false,
}, },
<<<<<<< HEAD
computed: {
hasPipeline() {
return this.pipeline && Object.keys(this.pipeline).length > 0;
},
hasCIError() {
return this.hasCi && !this.ciStatus;
},
status() {
return this.pipeline.details && this.pipeline.details.status
? this.pipeline.details.status
: {};
},
hasStages() {
return (
this.pipeline.details &&
this.pipeline.details.stages &&
this.pipeline.details.stages.length
);
},
hasCommitInfo() {
return this.pipeline.commit && Object.keys(this.pipeline.commit).length > 0;
},
/* We typically set defaults ([]) in the store or prop declarations, but because triggered
* and triggeredBy are appended to `pipeline`, we can't set defaults in the store, and we
* need to check their length here to prevent initializing linked-pipeline-mini-lists
* unneccessarily. */
triggered() {
return this.pipeline.triggered || [];
},
triggeredBy() {
const response = this.pipeline.triggered_by;
return response ? [response] : [];
},
=======
ciStatus: { ciStatus: {
type: String, type: String,
required: false, required: false,
>>>>>>> upstream/master
}, },
}, },
computed: { computed: {
...@@ -93,12 +43,25 @@ export default { ...@@ -93,12 +43,25 @@ export default {
}, },
hasStages() { hasStages() {
return ( return (
this.pipeline.details && this.pipeline.details.stages && this.pipeline.details.stages.length this.pipeline.details &&
this.pipeline.details.stages &&
this.pipeline.details.stages.length
); );
}, },
hasCommitInfo() { hasCommitInfo() {
return this.pipeline.commit && Object.keys(this.pipeline.commit).length > 0; return this.pipeline.commit && Object.keys(this.pipeline.commit).length > 0;
}, },
/* We typically set defaults ([]) in the store or prop declarations, but because triggered
* and triggeredBy are appended to `pipeline`, we can't set defaults in the store, and we
* need to check their length here to prevent initializing linked-pipeline-mini-lists
* unneccessarily. */
triggered() {
return this.pipeline.triggered || [];
},
triggeredBy() {
const response = this.pipeline.triggered_by;
return response ? [response] : [];
},
}, },
}; };
</script> </script>
...@@ -137,16 +100,6 @@ export default { ...@@ -137,16 +100,6 @@ export default {
<template v-if="hasCommitInfo"> <template v-if="hasCommitInfo">
for for
<<<<<<< HEAD
=======
<a
:href="pipeline.commit.commit_path"
class="commit-sha js-commit-link"
>
{{ pipeline.commit.short_id }}</a>.
</template>
>>>>>>> upstream/master
<a <a
:href="pipeline.commit.commit_path" :href="pipeline.commit.commit_path"
......
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