Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ed2a7a1e
Commit
ed2a7a1e
authored
May 07, 2016
by
Benedikt Huss
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build notification on merge request page change even if the build status didn't change
parent
f3578baa
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
10 deletions
+15
-10
CHANGELOG
CHANGELOG
+3
-0
app/assets/javascripts/merge_request_widget.js.coffee
app/assets/javascripts/merge_request_widget.js.coffee
+5
-4
app/views/projects/merge_requests/widget/_heading.html.haml
app/views/projects/merge_requests/widget/_heading.html.haml
+1
-6
spec/javascripts/merge_request_widget_spec.js.coffee
spec/javascripts/merge_request_widget_spec.js.coffee
+6
-0
No files found.
CHANGELOG
View file @
ed2a7a1e
...
...
@@ -31,6 +31,9 @@ v 8.8.0 (unreleased)
- Expire repository exists? and has_visible_content? caches after a push if necessary
- Fix unintentional filtering bug in issues sorted by milestone due (Takuya Noguchi)
v 8.7.4
- Fix always showing build notification message when switching between merge requests
v 8.7.3
- Emails, Gitlab::Email::Message, Gitlab::Diff, and Premailer::Adapter::Nokogiri are now instrumented
- Merge request widget displays TeamCity build state and code coverage correctly again.
...
...
app/assets/javascripts/merge_request_widget.js.coffee
View file @
ed2a7a1e
...
...
@@ -9,11 +9,12 @@ class @MergeRequestWidget
constructor
:
(
@
opts
)
->
$
(
'#modal_merge_info'
).
modal
(
show
:
false
)
@
firstCICheck
=
true
@
readyForCICheck
=
tru
e
@
readyForCICheck
=
fals
e
clearInterval
@
fetchBuildStatusInterval
@
clearEventListeners
()
@
addEventListeners
()
@
getCIStatus
(
false
)
@
pollCIStatus
()
notifyPermissions
()
...
...
@@ -71,7 +72,7 @@ class @MergeRequestWidget
if
data
.
status
is
''
return
if
@
firstC
i
Check
||
data
.
status
isnt
@
opts
.
ci_status
and
data
.
status
?
if
@
firstC
I
Check
||
data
.
status
isnt
@
opts
.
ci_status
and
data
.
status
?
@
opts
.
ci_status
=
data
.
status
@
showCIStatus
data
.
status
if
data
.
coverage
...
...
@@ -79,7 +80,7 @@ class @MergeRequestWidget
# The first check should only update the UI, a notification
# should only be displayed on status changes
if
showNotification
and
not
@
firstC
i
Check
if
showNotification
and
not
@
firstC
I
Check
status
=
@
ciLabelForStatus
(
data
.
status
)
if
status
is
"preparing"
...
...
@@ -102,7 +103,7 @@ class @MergeRequestWidget
@
close
()
Turbolinks
.
visit
_this
.
opts
.
builds_path
)
@
firstC
i
Check
=
false
@
firstC
I
Check
=
false
showCIStatus
:
(
state
)
->
$
(
'.ci_widget'
).
hide
()
...
...
app/views/projects/merge_requests/widget/_heading.html.haml
View file @
ed2a7a1e
...
...
@@ -41,9 +41,4 @@
.ci_widget.ci-error
{
style:
"display:none"
}
=
icon
(
"times-circle"
)
Could not connect to the CI server. Please check your settings and try again.
:javascript
$
(
function
()
{
merge_request_widget
.
getCIStatus
(
false
);
});
Could not connect to the CI server. Please check your settings and try again.
\ No newline at end of file
spec/javascripts/merge_request_widget_spec.js.coffee
View file @
ed2a7a1e
...
...
@@ -47,3 +47,9 @@ describe 'MergeRequestWidget', ->
spy
=
spyOn
(
@
class
,
'showCICoverage'
).
and
.
stub
()
@
class
.
getCIStatus
(
false
)
expect
(
spy
).
not
.
toHaveBeenCalled
()
it
'should not display a notification on the first check after the widget has been created'
,
->
spy
=
spyOn
(
window
,
'notify'
)
@
class
=
new
MergeRequestWidget
(
@
opts
)
@
class
.
getCIStatus
(
true
)
expect
(
spy
).
not
.
toHaveBeenCalled
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment