diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2019-06-04 16:48:45 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2019-06-04 16:48:45 +0300 |
commit | 280aa61eec7efa0b60501546b6e1efedf0b9dc85 (patch) | |
tree | b7e7ec000f237ac8a07dadaa9d1d3202545be1c1 /app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue | |
parent | b3907962ae1ab8801dab1be2241d659c036e55ed (diff) | |
parent | cc4b9a377a4150265d9efc869601e9675e82ec11 (diff) |
Merge branch 'mr-widget-merge-error' into 'master'
Update rendering of merge request in merge request widget
Closes #40246
See merge request gitlab-org/gitlab-ce!28238
Diffstat (limited to 'app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue')
-rw-r--r-- | app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue b/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue index eef2667e141..d02bb2f341d 100644 --- a/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue +++ b/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue @@ -1,6 +1,6 @@ <script> import _ from 'underscore'; -import { __ } from '~/locale'; +import { sprintf, s__, __ } from '~/locale'; import Project from '~/pages/projects/project'; import SmartInterval from '~/smart_interval'; import MRWidgetStore from 'ee_else_ce/vue_merge_request_widget/stores/mr_widget_store'; @@ -125,6 +125,11 @@ export default { this.mr.pipeline.target_sha !== this.mr.targetBranchSha, ); }, + mergeError() { + return sprintf(s__('mrWidget|Merge failed: %{mergeError}. Please try again.'), { + mergeError: this.mr.mergeError, + }); + }, }, watch: { state(newVal, oldVal) { @@ -370,6 +375,10 @@ export default { }} </mr-widget-alert-message> + <mr-widget-alert-message v-if="mr.mergeError" type="danger"> + {{ mergeError }} + </mr-widget-alert-message> + <source-branch-removal-status v-if="shouldRenderSourceBranchRemovalStatus" /> </div> </div> |