Skip to content
Snippets Groups Projects
Commit b471c76b authored by Jacob Schatz's avatar Jacob Schatz
Browse files

Reset MR opts

parent 936be025
No related branches found
No related tags found
No related merge requests found
Loading
@@ -15,6 +15,8 @@ class @MergeRequestWidget
Loading
@@ -15,6 +15,8 @@ class @MergeRequestWidget
@pollCIStatus() @pollCIStatus()
notifyPermissions() notifyPermissions()
   
setOpts: (@opts) ->
mergeInProgress: (deleteSourceBranch = false)-> mergeInProgress: (deleteSourceBranch = false)->
$.ajax $.ajax
type: 'GET' type: 'GET'
Loading
@@ -48,7 +50,7 @@ class @MergeRequestWidget
Loading
@@ -48,7 +50,7 @@ class @MergeRequestWidget
@getCIStatus(true) @getCIStatus(true)
   
@readyForCICheck = false @readyForCICheck = false
), 5000 ), 10000
   
getCIStatus: (showNotification) -> getCIStatus: (showNotification) ->
_this = @ _this = @
Loading
@@ -61,6 +63,10 @@ class @MergeRequestWidget
Loading
@@ -61,6 +63,10 @@ class @MergeRequestWidget
@firstCICheck = false @firstCICheck = false
@opts.ci_status = data.status @opts.ci_status = data.status
   
if @opts.ci_status is ''
@opts.ci_status = data.status
return
if data.status isnt @opts.ci_status if data.status isnt @opts.ci_status
@showCIStatus data.status @showCIStatus data.status
if data.coverage if data.coverage
Loading
Loading
Loading
@@ -22,4 +22,6 @@
Loading
@@ -22,4 +22,6 @@
   
if(typeof merge_request_widget === 'undefined') { if(typeof merge_request_widget === 'undefined') {
merge_request_widget = new MergeRequestWidget(opts); merge_request_widget = new MergeRequestWidget(opts);
} else {
merge_request_widget.setOpts(opts);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment