Merge branch '34130-null-pipes' into 'master'
Resolve "Merge request says "Could not connect to the CI server", no CI or integration is configured" See merge request gitlab-org/gitlab-ce!17053
This commit is contained in:
commit
e9802a833c
3 changed files with 15 additions and 0 deletions
|
@ -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}`;
|
||||||
|
|
5
changelogs/unreleased/34130-null-pipes.yml
Normal file
5
changelogs/unreleased/34130-null-pipes.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Prevent MR Widget error when no CI configured
|
||||||
|
merge_request:
|
||||||
|
author:
|
||||||
|
type: fixed
|
|
@ -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', () => {
|
||||||
|
|
Loading…
Reference in a new issue