refactor: Remove test run and completion logic from new watchers

This commit is contained in:
Faruk AYDIN
2022-10-28 00:46:32 +02:00
parent 3308a44c2b
commit 87fdc02224
2 changed files with 2 additions and 9 deletions

View File

@@ -44,8 +44,4 @@ export default defineTrigger({
async run($) {
await newWatchers($);
},
sort() {
return -1;
},
});

View File

@@ -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 parseLinkHeader from '../../../../helpers/parse-header-link';
@@ -34,9 +34,6 @@ const newWatchers = async ($: IGlobalVariable) => {
for (const watcher of response.data) {
const watcherId = watcher.id.toString();
if ($.flow.isAlreadyProcessed(watcherId) && !$.execution.testRun)
return;
const dataItem = {
raw: watcher,
meta: {
@@ -47,7 +44,7 @@ const newWatchers = async ($: IGlobalVariable) => {
$.pushTriggerItem(dataItem);
}
}
} while (pathname && !$.execution.testRun);
} while (pathname);
};
export default newWatchers;