chore: update tag filter method declaration

This commit is contained in:
Ben Beckford
2026-06-29 06:51:42 -07:00
parent 7f5240afae
commit 6b5e91ba5b
+20
View File
@@ -142,6 +142,24 @@ const methods = wrapper<Manifest>({
return { workflow: { continue: hasTimeZone === needsTimeZone } };
},
assetTagFilter: ({ config, data }) => {
const assetTags = data.asset.tags.map((tag) => tag.id);
for (const tag of config.tags) {
if (assetTags.includes(tag)) {
if (config.matching === 'any') {
break;
} else if (config.matching === 'none') {
return { workflow: { continue: false } };
}
} else if (config.matching === 'all') {
return { workflow: { continue: false } };
}
}
return { workflow: { continue: true } };
},
assetTypeFilter: ({ config, data }) => {
return { workflow: { continue: config.allowedTypes.includes(data.asset.type) } };
},
@@ -177,6 +195,7 @@ const {
assetLocationFilter,
assetLock,
assetMissingTimeZoneFilter,
assetTagFilter,
assetTypeFilter,
assetVisibility,
webhook,
@@ -193,6 +212,7 @@ export {
assetLocationFilter,
assetLock,
assetMissingTimeZoneFilter,
assetTagFilter,
assetTypeFilter,
assetVisibility,
webhook,