Skip to content

Commit

Permalink
fix(3272): Error while creating an event with a skip message (#640)
Browse files Browse the repository at this point in the history
  • Loading branch information
sagar1312 authored Jan 28, 2025
1 parent 376280e commit 7eac5d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/eventFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ class EventFactory extends BaseFactory {
.then(p => {
// Skip creating & starting builds
if (skipMessage) {
return event;
return null;
}

// Start builds
Expand Down
1 change: 1 addition & 0 deletions test/lib/eventFactory.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,7 @@ describe('Event Factory', () => {

return eventFactory.create(config).then(model => {
assert.instanceOf(model, Event);
assert.equal(model.builds, null);
assert.notCalled(jobFactoryMock.create);
assert.notCalled(buildFactoryMock.create);
assert.calledOnce(pipelineMock.sync);
Expand Down

0 comments on commit 7eac5d7

Please sign in to comment.