From 9f6629553d8d6c9544d4fc3997c1a1378dc55ae0 Mon Sep 17 00:00:00 2001 From: Jacob Williams Date: Tue, 2 Mar 2021 09:54:50 -0600 Subject: [PATCH] Added 'buildScmUpdated' event --- lib/build.js | 1 + lib/distributor.js | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/build.js b/lib/build.js index 4a334a6..3ca92b3 100644 --- a/lib/build.js +++ b/lib/build.js @@ -27,6 +27,7 @@ BuildsCollection.prototype.setDistributor = function(distributor) { this._proxyDistributorEvent('buildCompleted', 'buildCompleted'); this._proxyDistributorEvent('buildCanceled', 'buildCanceled'); this._proxyDistributorEvent('buildLogLines', 'buildLogLines'); + this._proxyDistributorEvent('buildScmUpdated', 'buildScmUpdated'); }; BuildsCollection.prototype._proxyDistributorEvent = function(source, dest) { diff --git a/lib/distributor.js b/lib/distributor.js index 1946a91..88f3879 100644 --- a/lib/distributor.js +++ b/lib/distributor.js @@ -257,6 +257,7 @@ Distributor.prototype._runNext = function(callback) { executor.once('scmData', function(scmData) { self._updateBuild(build, {scm: scmData}); + self.emit('buildScmUpdated', build); // run the same project again if we don't reach the latest rev if (!scmData.isLatest) { self.run({