BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
0 deletions
+15
-0
mr_widget_options.js
...javascripts/vue_merge_request_widget/mr_widget_options.js
+1
-0
34130-null-pipes.yml
changelogs/unreleased/34130-null-pipes.yml
+5
-0
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 {
},
handleNotification
(
data
)
{
if
(
data
.
ci_status
===
this
.
mr
.
ciStatus
)
return
;
if
(
!
data
.
pipeline
)
return
;
const
label
=
data
.
pipeline
.
details
.
status
.
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', () => {
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'
,
()
=>
{
...
...
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