The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
fix workflow
Kiran Ka5c087bac030
diff --git a/apps/web/lib/api/workflows/execute-award-bounty-action.ts b/apps/web/lib/api/workflows/execute-award-bounty-action.tsindex a8f56fa65d..b8e050289a 100644--- a/apps/web/lib/api/workflows/execute-award-bounty-action.ts+++ b/apps/web/lib/api/workflows/execute-award-bounty-action.ts@@ -12,7 +12,6 @@ export const executeAwardBountyAction = async ({context: WorkflowContext;}) => {if (action.type !== "awardBounty") {- console.error(`Skipping workflow action ${action.type}`);return;}@@ -34,8 +33,6 @@ export const executeAwardBountyAction = async ({},});- console.log(bounty);-if (!bounty) {console.error(`Bounty ${bountyId} not found.`);return;@@ -45,12 +42,10 @@ export const executeAwardBountyAction = async ({// Check bounty validityif (bounty.startsAt && bounty.startsAt > now) {- console.log(`Bounty ${bounty.id} has not started yet.`);return;}if (bounty.endsAt && bounty.endsAt < now) {- console.log(`Bounty ${bounty.id} has already ended on ${bounty.endsAt}.`);return;}diff --git a/apps/web/lib/api/workflows/execute-workflows.ts b/apps/web/lib/api/workflows/execute-workflows.tsindex ee023e9d91..d3defd356a 100644--- a/apps/web/lib/api/workflows/execute-workflows.ts+++ b/apps/web/lib/api/workflows/execute-workflows.ts@@ -30,7 +30,6 @@ export async function executeWorkflows({});if (workflows.length === 0) {- console.log(`Program ${programId} has no workflows to execute.`);return;}@@ -95,14 +94,13 @@ export async function executeWorkflows({.parse(workflow.triggerConditions);if (conditions.length === 0) {- console.log(`Workflow ${workflow.id} has no trigger conditions.`);continue;}const actions = z.array(workflowActionSchema).parse(workflow.actions);if (actions.length === 0) {- console.log(`Workflow ${workflow.id} has no actions.`);+ continue;}// We only support one trigger and action for now@@ -116,7 +114,7 @@ export async function executeWorkflows({if (!shouldExecute) {console.log(- `Workflow ${workflow.id} is does not meet the trigger condition.`,+ `Workflow ${workflow.id} does not meet the trigger condition.`,);continue;}