refactor: Remove test run and completion logic from new watchers
This commit is contained in:
@@ -44,8 +44,4 @@ export default defineTrigger({
|
|||||||
async run($) {
|
async run($) {
|
||||||
await newWatchers($);
|
await newWatchers($);
|
||||||
},
|
},
|
||||||
|
|
||||||
sort() {
|
|
||||||
return -1;
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { IGlobalVariable, ITriggerOutput } from '@automatisch/types';
|
import { IGlobalVariable } from '@automatisch/types';
|
||||||
import getRepoOwnerAndRepo from '../../common/get-repo-owner-and-repo';
|
import getRepoOwnerAndRepo from '../../common/get-repo-owner-and-repo';
|
||||||
import parseLinkHeader from '../../../../helpers/parse-header-link';
|
import parseLinkHeader from '../../../../helpers/parse-header-link';
|
||||||
|
|
||||||
@@ -34,9 +34,6 @@ const newWatchers = async ($: IGlobalVariable) => {
|
|||||||
for (const watcher of response.data) {
|
for (const watcher of response.data) {
|
||||||
const watcherId = watcher.id.toString();
|
const watcherId = watcher.id.toString();
|
||||||
|
|
||||||
if ($.flow.isAlreadyProcessed(watcherId) && !$.execution.testRun)
|
|
||||||
return;
|
|
||||||
|
|
||||||
const dataItem = {
|
const dataItem = {
|
||||||
raw: watcher,
|
raw: watcher,
|
||||||
meta: {
|
meta: {
|
||||||
@@ -47,7 +44,7 @@ const newWatchers = async ($: IGlobalVariable) => {
|
|||||||
$.pushTriggerItem(dataItem);
|
$.pushTriggerItem(dataItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (pathname && !$.execution.testRun);
|
} while (pathname);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default newWatchers;
|
export default newWatchers;
|
||||||
|
Reference in New Issue
Block a user