refactor: Remove testRun and completion check from new stargazers

This commit is contained in:
Faruk AYDIN
2022-10-28 00:41:23 +02:00
parent 796121acfc
commit 3308a44c2b
2 changed files with 1 additions and 10 deletions

View File

@@ -43,10 +43,4 @@ export default defineTrigger({
async run($) { async run($) {
await newStargazers($); await newStargazers($);
}, },
sort(stargazerA, stargazerB) {
return (
Number(stargazerB.meta.internalId) - Number(stargazerA.meta.internalId)
);
},
}); });

View File

@@ -48,9 +48,6 @@ const newStargazers = async ($: IGlobalVariable) => {
const { starred_at, user } = starEntry; const { starred_at, user } = starEntry;
const timestamp = DateTime.fromISO(starred_at).toMillis(); const timestamp = DateTime.fromISO(starred_at).toMillis();
if (timestamp <= Number($.flow.lastInternalId) && !$.execution.testRun)
return;
const dataItem = { const dataItem = {
raw: user, raw: user,
meta: { meta: {
@@ -61,7 +58,7 @@ const newStargazers = async ($: IGlobalVariable) => {
$.pushTriggerItem(dataItem); $.pushTriggerItem(dataItem);
} }
} }
} while (pathname && !$.execution.testRun); } while (pathname);
}; };
export default newStargazers; export default newStargazers;