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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
4e732dec
Commit
4e732dec
authored
Feb 12, 2018
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent MR Widget error when no CI configured
parent
498ade48
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
0 deletions
+15
-0
app/assets/javascripts/vue_merge_request_widget/mr_widget_options.js
...javascripts/vue_merge_request_widget/mr_widget_options.js
+1
-0
changelogs/unreleased/34130-null-pipes.yml
changelogs/unreleased/34130-null-pipes.yml
+5
-0
spec/javascripts/vue_mr_widget/mr_widget_options_spec.js
spec/javascripts/vue_mr_widget/mr_widget_options_spec.js
+9
-0
No files found.
app/assets/javascripts/vue_merge_request_widget/mr_widget_options.js
View file @
4e732dec
...
@@ -152,6 +152,7 @@ export default {
...
@@ -152,6 +152,7 @@ export default {
},
},
handleNotification
(
data
)
{
handleNotification
(
data
)
{
if
(
data
.
ci_status
===
this
.
mr
.
ciStatus
)
return
;
if
(
data
.
ci_status
===
this
.
mr
.
ciStatus
)
return
;
if
(
!
data
.
pipeline
)
return
;
const
label
=
data
.
pipeline
.
details
.
status
.
label
;
const
label
=
data
.
pipeline
.
details
.
status
.
label
;
const
title
=
`Pipeline
${
label
}
`
;
const
title
=
`Pipeline
${
label
}
`
;
...
...
changelogs/unreleased/34130-null-pipes.yml
0 → 100644
View file @
4e732dec
---
title
:
Prevent MR Widget error when no CI configured
merge_request
:
author
:
type
:
fixed
spec/javascripts/vue_mr_widget/mr_widget_options_spec.js
View file @
4e732dec
...
@@ -295,6 +295,15 @@ describe('mrWidgetOptions', () => {
...
@@ -295,6 +295,15 @@ describe('mrWidgetOptions', () => {
expect
(
notify
.
notifyMe
).
not
.
toHaveBeenCalled
();
expect
(
notify
.
notifyMe
).
not
.
toHaveBeenCalled
();
});
});
it
(
'
should not notify if no pipeline provided
'
,
()
=>
{
vm
.
handleNotification
({
...
data
,
pipeline
:
undefined
,
});
expect
(
notify
.
notifyMe
).
not
.
toHaveBeenCalled
();
});
});
});
describe
(
'
resumePolling
'
,
()
=>
{
describe
(
'
resumePolling
'
,
()
=>
{
...
...
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