From 78f70545ea160a57bf6fc33000076de5e72ab30d Mon Sep 17 00:00:00 2001
From: Sam Bigelow <sbigelow@gitlab.com>
Date: Tue, 11 Dec 2018 13:27:35 -0500
Subject: Set cached MRWidget SHA after rebase

Update changelog to include Merge Request ID and Author

Update changelog to include Merge Request ID and Author
---
 .../javascripts/vue_merge_request_widget/mr_widget_options.vue    | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue')

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 3c3e3efcc36..d8a75388e84 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
@@ -155,13 +155,13 @@ export default {
       };
       return new MRWidgetService(endpoints);
     },
-    checkStatus(cb) {
+    checkStatus(cb, isRebased) {
       return this.service
         .checkStatus()
         .then(res => res.data)
         .then(data => {
           this.handleNotification(data);
-          this.mr.setData(data);
+          this.mr.setData(data, isRebased);
           this.setFaviconHelper();
 
           if (cb) {
@@ -263,6 +263,10 @@ export default {
         this.checkStatus(cb);
       });
 
+      eventHub.$on('MRWidgetRebaseSuccess', cb => {
+        this.checkStatus(cb, true);
+      });
+
       // `params` should be an Array contains a Boolean, like `[true]`
       // Passing parameter as Boolean didn't work.
       eventHub.$on('SetBranchRemoveFlag', params => {
-- 
cgit v1.2.1

