Strange logic in merge_request_widget
Created by: vadim-plaksin
if @firstCICheck
@firstCICheck = false
@opts.ci_status = data.status
if @opts.ci_status is ''
@opts.ci_status = data.status
return
if data.status isnt @opts.ci_status and data.status?
@showCIStatus data.status
If the CI build has already been completed when this script loads and always returns the same status, for instance 'success' then the widget status will never change and will always show 'Checking CI status for ...'
Basically the widget status will change only if more than one status is received from the CI during the session.